HTextArea: consider preeditText for getWordAt()
`preeditText` is partial input from IME and touchscreen autocompleting keyboards, consider it together with `text` for the `getWordAt()` function. This should allow user autocompletion to work properly in these specific conditions.
This commit is contained in:
parent
eadc4bb317
commit
e7f769b344
|
@ -20,6 +20,7 @@ TextArea {
|
||||||
property var disabledText: null
|
property var disabledText: null
|
||||||
property var defaultText: null // XXX test me
|
property var defaultText: null // XXX test me
|
||||||
readonly property bool changed: text !== (defaultText || "")
|
readonly property bool changed: text !== (defaultText || "")
|
||||||
|
readonly property string displayText: text + preeditText
|
||||||
|
|
||||||
property alias backgroundColor: textAreaBackground.color
|
property alias backgroundColor: textAreaBackground.color
|
||||||
property color borderColor: theme.controls.textArea.border
|
property color borderColor: theme.controls.textArea.border
|
||||||
|
@ -42,7 +43,7 @@ TextArea {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getWordAt(position) {
|
function getWordAt(position) {
|
||||||
return utils.getWordAtPosition(text, position)
|
return utils.getWordAtPosition(displayText, position)
|
||||||
}
|
}
|
||||||
|
|
||||||
function getWordBehindCursor() {
|
function getWordBehindCursor() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user