From 4658f3453bf6b1f9bf087d13a72c69f74ae74ab5 Mon Sep 17 00:00:00 2001 From: Martin Zimandl Date: Tue, 1 Nov 2022 10:28:51 +0100 Subject: [PATCH] another composition mode fix --- public/files/js/views/cqlEditor.tsx | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/public/files/js/views/cqlEditor.tsx b/public/files/js/views/cqlEditor.tsx index 4d458cecd8..1fbd250065 100644 --- a/public/files/js/views/cqlEditor.tsx +++ b/public/files/js/views/cqlEditor.tsx @@ -339,16 +339,18 @@ export function init(dispatcher:IActionDispatcher, he:Kontext.ComponentHelpers, } private handleSelect() { - const [anchorIdx, focusIdx] = this.contentEditable.getRawSelection(); - dispatcher.dispatch({ - name: Actions.QueryInputSelectText.name, - payload: { - sourceId: this.props.sourceId, - formType: this.props.formType, - anchorIdx, - focusIdx - } - }); + if (!this.props.compositionModeOn) { + const [anchorIdx, focusIdx] = this.contentEditable.getRawSelection(); + dispatcher.dispatch({ + name: Actions.QueryInputSelectText.name, + payload: { + sourceId: this.props.sourceId, + formType: this.props.formType, + anchorIdx, + focusIdx + } + }); + } } componentDidUpdate(prevProps, prevState) {