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) {