Skip to content

Commit

Permalink
another composition mode fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mzimandl committed Nov 1, 2022
1 parent 18a281e commit 4658f34
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions public/files/js/views/cqlEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -339,16 +339,18 @@ export function init(dispatcher:IActionDispatcher, he:Kontext.ComponentHelpers,
}

private handleSelect() {
const [anchorIdx, focusIdx] = this.contentEditable.getRawSelection();
dispatcher.dispatch<typeof Actions.QueryInputSelectText>({
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<typeof Actions.QueryInputSelectText>({
name: Actions.QueryInputSelectText.name,
payload: {
sourceId: this.props.sourceId,
formType: this.props.formType,
anchorIdx,
focusIdx
}
});
}
}

componentDidUpdate(prevProps, prevState) {
Expand Down

0 comments on commit 4658f34

Please sign in to comment.