summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Hergert <chergert@redhat.com>2021-09-29 12:46:45 -0700
committerChristian Hergert <chergert@redhat.com>2021-09-29 12:50:18 -0700
commit888e828e86af84ac460c2cba99ffe1fb6ccdf9d2 (patch)
tree601f158c4862d64cd60265f5e27c4de01abe8892
parent5dfc3c1ef85db9267f37efffe958c6ae4b493a37 (diff)
downloadgnome-shell-wip/chergert/fix-4647.tar.gz
inputMethod: Clear preeditStr before resetwip/chergert/fix-4647
Previously, these were performed in a different order before GNOME 41. During some other changes they were swapped. However, this causes both GTK 3 and GTK 4 applications to scroll to incorrect positions from the preedit change. Fixes #4647 Fixes GNOME/gtk#4289 Fixes GNOME/gnome-builder#1536 Fixes GNOME/gnome-builder#1531
-rw-r--r--js/misc/inputMethod.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/js/misc/inputMethod.js b/js/misc/inputMethod.js
index 25b02e35b..1f9eaee7a 100644
--- a/js/misc/inputMethod.js
+++ b/js/misc/inputMethod.js
@@ -179,16 +179,16 @@ class InputMethod extends Clutter.InputMethod {
}
vfunc_reset() {
+ if (this._context) {
+ this._context.reset();
+ this._emitRequestSurrounding();
+ }
+
if (this._preeditStr !== null) {
// Unset any preedit text
this.set_preedit_text(null, 0, Clutter.PreeditResetMode.CLEAR);
this._preeditStr = null;
}
-
- if (this._context) {
- this._context.reset();
- this._emitRequestSurrounding();
- }
}
vfunc_set_cursor_location(rect) {