diff --git a/js/misc/inputMethod.js b/js/misc/inputMethod.js index 07c177b81..3a007d5e9 100644 --- a/js/misc/inputMethod.js +++ b/js/misc/inputMethod.js @@ -187,8 +187,10 @@ var InputMethod = GObject.registerClass({ vfunc_focus_out() { this._currentFocus = null; - if (this._context) + if (this._context) { + this._fullReset(); this._context.focus_out(); + } if (this._preeditStr && this._preeditVisible) { // Unset any preedit text @@ -353,6 +355,13 @@ var InputMethod = GObject.registerClass({ } } + _fullReset() { + this._context.set_content_type(0, 0); + this._context.set_cursor_location(0, 0, 0, 0); + this._context.set_capabilities(0); + this._context.reset(); + } + update() { if (!this._context) return;