Skip to content

Commit c207b46

Browse files
committed
StatusBaseInput: workaround for unintended multiline on mobile
1 parent 4d2889d commit c207b46

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ui/StatusQ/src/StatusQ/Controls/StatusBaseInput.qml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,11 @@ Item {
371371
property string previousText: text
372372
property var keyEvent
373373

374+
// This workaround prevents entering new line on mobile when it's not desired.
375+
// Qt.ImhSensitiveData prevents entering new line, instead Keys.returnPressed
376+
// is emitted and can be handled in a regular way.
377+
inputMethodHints: Utils.isMobile && !multiline ? Qt.ImhSensitiveData : Qt.ImhNone
378+
374379
topPadding: root.multiline ? 0 : root.topPadding
375380
bottomPadding: root.multiline ? 0: root.bottomPadding
376381
width: flick.width

0 commit comments

Comments
 (0)