Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #17423 from timdream/keyboard-mempressure-race-master
Browse files Browse the repository at this point in the history
Bug 984238 - Don't kill the keyboard when when it's being launched +shepherd
  • Loading branch information
rvandermeulen committed Mar 28, 2014
1 parent 74a5f4c commit e1b22e2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/system/js/keyboard_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ var KeyboardManager = {
console.log('[Keyboard Manager] ' + msg);
},
keyboardHeight: 0,
hasActiveKeyboard: false,
isOutOfProcessEnabled: false,

init: function km_init() {
Expand Down Expand Up @@ -449,9 +450,10 @@ var KeyboardManager = {
// get rid of it.
// We only do that when we don't run keyboards OOP.
this._debug('mozmemorypressure event');
if (!this.isOutOfProcessEnabled && this.keyboardHeight == 0) {
if (!this.isOutOfProcessEnabled && !this.hasActiveKeyboard) {
Object.keys(this.runningLayouts).forEach(this.removeKeyboard, this);
this.runningLayouts = {};
this._debug('mozmemorypressure event; keyboard removed');
}
break;
}
Expand Down Expand Up @@ -752,6 +754,7 @@ var KeyboardManager = {
if (frame.setInputMethodActive) {
frame.setInputMethodActive(active);
}
this.hasActiveKeyboard = active;
}
};

Expand Down

0 comments on commit e1b22e2

Please sign in to comment.