Add focus element in input component while the placeholder is displayed.

This should fix:
https://github.com/ArthurSonzogni/FTXUI/issues/2
This commit is contained in:
ArthurSonzogni 2019-06-30 10:11:48 +02:00
parent 8b79b3af99
commit b8a81bae9e

View File

@ -12,7 +12,7 @@ Element Input::Render() {
// Placeholder. // Placeholder.
if (content.size() == 0) { if (content.size() == 0) {
if (is_focused) if (is_focused)
return text(placeholder) | dim | inverted | main_decorator; return text(placeholder) | focus | dim | inverted | main_decorator;
else else
return text(placeholder) | dim | main_decorator; return text(placeholder) | dim | main_decorator;
} }