Skip to content

Commit 2ead609

Browse files
committed
qml: ElTextArea: hide placeholder text on user input
When the user enters something into the ElTextArea the placeholder text should be hidden so it doesn't conflict with the user input. This affects e.g. the lnurl pay dialog.
1 parent 5ae62c0 commit 2ead609

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

electrum/gui/qml/components/controls/ElTextArea.qml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Flickable {
1717
property alias background: rootpane.background
1818
property alias font: edit.font
1919
property alias inputMethodHints: edit.inputMethodHints
20-
property alias placeholderText: edit.placeholderText
20+
property string placeholderText
2121
property alias color: edit.color
2222
property alias topPadding: rootpane.topPadding
2323
readonly property bool anyActiveFocus: activeFocus || edit.activeFocus
@@ -55,6 +55,7 @@ Flickable {
5555
width: parent.width
5656
focus: true
5757
wrapMode: TextEdit.Wrap
58+
placeholderText: edit.text.length ? "" : root.placeholderText
5859
onCursorRectangleChanged: root.ensureVisible(cursorRectangle)
5960
onTextChanged: root.textChanged()
6061
background: Rectangle {

0 commit comments

Comments
 (0)