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 #17687 from RudyLu/keyboard/Bug984328
Browse files Browse the repository at this point in the history
Bug 984328 - [Keyboard][V1.3T] The alternative char menu cannot be
r=timdream
  • Loading branch information
RudyLu committed Mar 27, 2014
2 parents 386f4ac + 1956499 commit 6c3dc37
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions apps/keyboard/js/render.js
Expand Up @@ -41,6 +41,9 @@ const IMERender = (function() {
isSpecialKey = keyTest;
ime = document.getElementById('keyboard');
menu = document.getElementById('keyboard-accent-char-menu');

cachedWindowHeight = window.innerHeight;
cachedWindowWidth = window.innerWidth;
};

var setInputMethodName = function(name) {
Expand Down
12 changes: 9 additions & 3 deletions apps/keyboard/test/unit/keyboard_test.js
Expand Up @@ -3,11 +3,13 @@
suite('keyboard.js', function() {

requireApp('keyboard/js/keyboard.js');
var mockMozInputMethod;
var realMozInputMethod;

suiteSetup(function() {
realMozInputMethod = window.navigator.mozInputMethod;
if ('mozInputMethod' in window.navigator) {
realMozInputMethod = window.navigator.mozInputMethod;
}

window.navigator.mozInputMethod = {
mgmt: {
showAll: sinon.stub()
Expand All @@ -16,7 +18,11 @@ suite('keyboard.js', function() {
});

suiteTeardown(function() {
window.navigator.mozInputMethod = realMozInputMethod;
if (realMozInputMethod) {
window.navigator.mozInputMethod = realMozInputMethod;
} else {
delete window.navigator.mozInputMethod;
}
});

suite('clearTouchedKeys', function() {
Expand Down

0 comments on commit 6c3dc37

Please sign in to comment.