WInplaceEdit PlaceholderText not rendered in Chrome and Firefox
Added by Christian Meyer over 4 years ago
Hi there!
I am using an WInplaceEdit
and would like to set an EmptyText with setPlaceholderText
.
Unfortunately this placeholder is not rendered... Making it impossible to actually change it.
InPLaceEdit
is in the Title Widget of a Dialog and is either set, if the wanted string is not empty, or an placeholder text is used.
In a short Test it also happened if I just put it on the main container, no dialog involved.
txt_Title = dialog->titleBar()->addNew<Wt::WInPlaceEdit>();
if(objItem->s_itemTitle.empty())
txt_Title->setPlaceholderText(Wt::WString::tr("text.empty.InplaceEdit"));
// resolves to "Please click to change" -> Works if used with "setText";
else
txt_Title->setText(objItem->s_itemTitle);
Firefox is Version 69.0
Chromium is 76.0.3809.132
Looking at the generated HTML Code, the span with class input-group
is styled with "display:none;"
If that is deaktivated, the Input Form including the placeholder Text and Buttons are shown.
Question is: is that a feature or a Bug? I would like to be the placeholder Text be visible from the get go, and have the controls when the Text is actually changing.
How do I do that?
Wt Version 4.1.0
Thank you!
Christian