HTextArea: prevent leaking left/right if readOnly
This commit is contained in:
parent
224e82f38c
commit
c9843bb2ff
|
@ -97,9 +97,11 @@ TextArea {
|
|||
|
||||
// Prevent leaking arrow presses to parent elements when the carret is at
|
||||
// the beginning or end of the text
|
||||
Keys.onLeftPressed: event.accepted = cursorPosition === 0 && ! selectedText
|
||||
Keys.onLeftPressed:
|
||||
event.accepted = readOnly || (cursorPosition === 0 && ! selectedText)
|
||||
Keys.onRightPressed:
|
||||
event.accepted = cursorPosition === length && ! selectedText
|
||||
event.accepted =
|
||||
readOnly || (cursorPosition === length && ! selectedText)
|
||||
|
||||
KeyNavigation.priority: KeyNavigation.BeforeItem
|
||||
KeyNavigation.tab: focusItemOnTab
|
||||
|
|
Loading…
Reference in New Issue
Block a user