diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index 7d56ef9c8..8b7f0f895 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -1868,6 +1868,10 @@ var KeyboardController = class { Main.inputMethod.disconnect(this._notifyContentPurposeId); Main.inputMethod.disconnect(this._notifyContentHintsId); Main.inputMethod.disconnect(this._notifyInputPanelStateId); + + // Make sure any buttons pressed by the virtual device are released + // immediately instead of waiting for the next GC cycle + this._virtualDevice.run_dispose(); } _onSourcesModified() {