From c7d52c0f922fb8ef4c30655aafaf84fd956c9eee Mon Sep 17 00:00:00 2001 From: dxue Date: Tue, 30 Sep 2014 10:24:54 +0800 Subject: [PATCH 1/5] Bug 985853 - [Keyboard UX update][User Story] Hold shift to enter upper case characters --- .../js/keyboard/active_targets_manager.js | 8 ++-- apps/keyboard/js/keyboard/target_handlers.js | 33 ++++++++++++- .../js/keyboard/target_handlers_manager.js | 5 ++ apps/keyboard/js/render.js | 15 ++++++ apps/keyboard/style/keyboard.css | 48 ++++++++++++++++--- 5 files changed, 98 insertions(+), 11 deletions(-) diff --git a/apps/keyboard/js/keyboard/active_targets_manager.js b/apps/keyboard/js/keyboard/active_targets_manager.js index d33f9ba2ff84..0c6360f35610 100644 --- a/apps/keyboard/js/keyboard/active_targets_manager.js +++ b/apps/keyboard/js/keyboard/active_targets_manager.js @@ -33,6 +33,7 @@ ActiveTargetsManager.prototype.ontargetmovedin = null; ActiveTargetsManager.prototype.ontargetcommitted = null; ActiveTargetsManager.prototype.ontargetcancelled = null; ActiveTargetsManager.prototype.ontargetdoubletapped = null; +ActiveTargetsManager.prototype.onnewtargetwillactivate = null; // Show accent char menu (if there is one) or do other stuff // after LONG_PRESS_TIMEOUT @@ -99,10 +100,11 @@ ActiveTargetsManager.prototype._handlePressStart = function(press, id) { return; } - // All targets before the new touch need to be committed, - // according to UX requirement. + // Notify current targets about the new touch. this.activeTargets.forEach(function(target, id) { - this._handlePressEnd(press, id); + if (typeof this.onnewtargetwillactivate === 'function') { + this.onnewtargetwillactivate(target); + } }, this); var target = press.target; diff --git a/apps/keyboard/js/keyboard/target_handlers.js b/apps/keyboard/js/keyboard/target_handlers.js index 51aa2e288dc5..5438285b2c0b 100644 --- a/apps/keyboard/js/keyboard/target_handlers.js +++ b/apps/keyboard/js/keyboard/target_handlers.js @@ -1,6 +1,6 @@ 'use strict'; -/* global KeyEvent */ +/* global KeyEvent, IMERender */ (function(exports) { @@ -79,6 +79,11 @@ DefaultTargetHandler.prototype.doubleTap = function() { this.app.console.log('DefaultTargetHandler.doubleTap()'); this.commit(); }; +DefaultTargetHandler.prototype.newTargetActivate = function() { + this.commit(); + // Ignore any action when commit. + this.ignoreCommitActions = true; +}; var NullTargetHandler = function(target, app) { DefaultTargetHandler.apply(this, arguments); @@ -231,11 +236,28 @@ var CapsLockTargetHandler = function(target, app) { DefaultTargetHandler.apply(this, arguments); }; CapsLockTargetHandler.prototype = Object.create(DefaultTargetHandler.prototype); +CapsLockTargetHandler.prototype.capsLockState = 'none'; +CapsLockTargetHandler.prototype.newTargetActivated = false; +CapsLockTargetHandler.prototype.activate = function() { + if (this.app.upperCaseStateManager.isUpperCaseLocked) { + this.capsLockState = 'upperCaseLocked'; + } else if (this.app.upperCaseStateManager.isUpperCase) { + this.capsLockState = 'upperCase'; + } else { + this.capsLockState = 'none'; + } + this.app.feedbackManager.triggerFeedback(this.target); + this.app.visualHighlightManager.show(this.target); +}; CapsLockTargetHandler.prototype.commit = function() { + // If hold shift to enter upper case, set isUpperCase false when finished this.app.upperCaseStateManager.switchUpperCaseState({ - isUpperCase: !this.app.upperCaseStateManager.isUpperCase, + isUpperCase: this.newTargetActivated ? false : + !this.app.upperCaseStateManager.isUpperCase, isUpperCaseLocked: false }); + this.newTargetActivated = false; + this.capsLockState = 'none'; this.app.visualHighlightManager.hide(this.target); }; CapsLockTargetHandler.prototype.doubleTap = function() { @@ -244,6 +266,13 @@ CapsLockTargetHandler.prototype.doubleTap = function() { }); this.app.visualHighlightManager.hide(this.target); }; +CapsLockTargetHandler.prototype.newTargetActivate = function() { + this.newTargetActivated = true; + this.app.upperCaseStateManager.switchUpperCaseState({ + isUpperCaseLocked: true + }); + IMERender.highlightKey(this.target, { capsLockState: this.capsLockState }); +}; var SwitchKeyboardTargetHandler = function(target, app) { DefaultTargetHandler.apply(this, arguments); diff --git a/apps/keyboard/js/keyboard/target_handlers_manager.js b/apps/keyboard/js/keyboard/target_handlers_manager.js index 9608ef6e51b3..ba96c9161a4a 100644 --- a/apps/keyboard/js/keyboard/target_handlers_manager.js +++ b/apps/keyboard/js/keyboard/target_handlers_manager.js @@ -39,6 +39,8 @@ TargetHandlersManager.prototype.start = function() { this._callTargetAction.bind(this, 'cancel', false, true); activeTargetsManager.ontargetdoubletapped = this._callTargetAction.bind(this, 'doubleTap', false, true); + activeTargetsManager.onnewtargetwillactivate = + this._callTargetAction.bind(this, 'newTargetActivate', false, false); activeTargetsManager.start(); }; @@ -61,6 +63,9 @@ TargetHandlersManager.prototype.stop = function() { // "longpress" is noticeably an optional step during the life cycle and does // not start or end the handler/active target, so it was not mentioned in the // above list. +// "newTargetActivate" is similar to "longpress", it is an optional step too, +// so it was not mentioned in the above list. When newTargetActivate is called, +// isUpperCase will be set to true, and hold the icon's background. // // Please note that since we are using target (an abstract key object associated // with one DOM element) as the identifier of handlers, we do not assign new diff --git a/apps/keyboard/js/render.js b/apps/keyboard/js/render.js index 5435e937bbd5..542c6d9f0940 100644 --- a/apps/keyboard/js/render.js +++ b/apps/keyboard/js/render.js @@ -318,11 +318,26 @@ var IMERender = (function() { if (!options.showUpperCase) { keyElem.classList.add('lowercase'); } + // Show highlight locked background. + switch (options.capsLockState) { + case 'upperCaseLocked': + keyElem.classList.add('highlight-locked-uppercaselocked'); + break; + case 'upperCase': + keyElem.classList.add('highlight-locked-uppercase'); + break; + case 'none': + keyElem.classList.add('highlight-locked-none'); + break; + } }; // Unhighlight a key var unHighlightKey = function kr_unHighlightKey(key) { var keyElem = targetObjDomMap.get(key); + keyElem.classList.remove('highlight-locked-uppercaselocked'); + keyElem.classList.remove('highlight-locked-uppercase'); + keyElem.classList.remove('highlight-locked-none'); keyElem.classList.remove('highlighted'); keyElem.classList.remove('lowercase'); }; diff --git a/apps/keyboard/style/keyboard.css b/apps/keyboard/style/keyboard.css index 2cd483234ed0..0f1549a7ac46 100644 --- a/apps/keyboard/style/keyboard.css +++ b/apps/keyboard/style/keyboard.css @@ -179,6 +179,39 @@ button::-moz-focus-inner { left: 0; } +/* Rules for hold shift to enter upper case */ +.keyboard-key.highlight-locked-uppercaselocked { + background-color: #4a5255; +} + +.keyboard-key.highlight-locked-uppercaselocked > .visual-wrapper { + box-shadow: 0 0.4rem 0 #00caf2; +} + +.keyboard-key.highlight-locked-none > .visual-wrapper > .key-element { + color: #00b8d6; +} + +.keyboard-key.highlight-locked-uppercase { + background-color: #00caf2; +} + +.keyboard-key.highlight-locked-uppercase > .visual-wrapper { + box-shadow: 0 0 0 #00caf2; +} + +.keyboard-key.highlight-locked-uppercase > .visual-wrapper > .key-element { + color: #00b8d6; + border-right-color: transparent; +} + +.keyboard-key.highlight-locked-none > .visual-wrapper { + box-shadow: 0 0 0 #00caf2; +} + +.keyboard-key.highlight-locked-none > .visual-wrapper > .key-element { + color: #00b8d6; +} /* Special keys */ .keyboard-key.special-key > .visual-wrapper > .key-element { @@ -186,12 +219,15 @@ button::-moz-focus-inner { right: 0; bottom: 0; left: 0; - color: #abb0b1; font: 500 1.5rem/4.3rem 'Keyboard Symbols', sans-serif; } +.keyboard-key.special-key:not([class*='highlight-locked']) > .visual-wrapper > .key-element { + color: #abb0b1; +} + /* Highlight for special keys */ -.keyboard-key.special-key.highlighted > .visual-wrapper > .key-element { +.keyboard-key.special-key.highlighted:not([class*='highlight-locked']) > .visual-wrapper > .key-element { color: #00b8d6; } @@ -243,22 +279,22 @@ button::-moz-focus-inner { /* Key states */ /* Active key, used for shift key - uppercase */ -.keyboard-key.kbr-key-active { +.keyboard-key.kbr-key-active:not([class*='highlight-locked']) { background-color: #00caf2; } -.keyboard-key.kbr-key-active > .visual-wrapper > .key-element { +.keyboard-key.kbr-key-active:not([class*='highlight-locked']) > .visual-wrapper > .key-element { color: #fff; border-right-color: transparent; } /* Caps lock case */ -.keyboard-key.special-key.kbr-key-hold > .visual-wrapper > .key-element { +.keyboard-key.special-key.kbr-key-hold:not([class*='highlight-locked']) > .visual-wrapper > .key-element { color: #00caf2; } /* The underline for caps lock */ -.keyboard-key.kbr-key-hold > .visual-wrapper { +.keyboard-key.kbr-key-hold:not([class*='highlight-locked']) > .visual-wrapper { box-shadow: 0 0.4rem 0 #00caf2; } From a3927b1f8549259f46426285f60297944d3addab Mon Sep 17 00:00:00 2001 From: Timothy Guan-tin Chien Date: Tue, 30 Sep 2014 11:54:10 +0800 Subject: [PATCH 2/5] WIP - set isUpperCaseLocked when shift is pressed on instead --- apps/keyboard/js/keyboard/target_handlers.js | 86 +++++++++++++------ .../js/keyboard/target_handlers_manager.js | 4 +- apps/keyboard/js/render.js | 15 ---- 3 files changed, 64 insertions(+), 41 deletions(-) diff --git a/apps/keyboard/js/keyboard/target_handlers.js b/apps/keyboard/js/keyboard/target_handlers.js index 5438285b2c0b..63db44546e5d 100644 --- a/apps/keyboard/js/keyboard/target_handlers.js +++ b/apps/keyboard/js/keyboard/target_handlers.js @@ -1,6 +1,6 @@ 'use strict'; -/* global KeyEvent, IMERender */ +/* global KeyEvent */ (function(exports) { @@ -80,8 +80,10 @@ DefaultTargetHandler.prototype.doubleTap = function() { this.commit(); }; DefaultTargetHandler.prototype.newTargetActivate = function() { + // According to UX requirement, the current target need to be committed when + // there is a new press. We will have to commit ourselves here. this.commit(); - // Ignore any action when commit. + // Ignore addition calls on commit(). this.ignoreCommitActions = true; }; @@ -114,6 +116,12 @@ var CandidateSelectionTargetHandler = function(target, app) { CandidateSelectionTargetHandler.prototype = Object.create(DefaultTargetHandler.prototype); CandidateSelectionTargetHandler.prototype.commit = function() { + if (this.ignoreCommitActions) { + this.app.console.log( + 'CandidateSelectionTargetHandler.commit()::return early'); + return; + } + this.app.candidatePanelManager.hideFullPanel(); // We use the target's data instead of target.text because the @@ -179,6 +187,8 @@ BackspaceTargetHandler.prototype.moveIn = function() { BackspaceTargetHandler.prototype.commit = function() { if (this.ignoreCommitActions) { + this.app.console.log( + 'BackspaceTargetHandler.commit()::return early'); return; } @@ -203,6 +213,12 @@ var CompositeTargetHandler = function(target, app) { CompositeTargetHandler.prototype = Object.create(DefaultTargetHandler.prototype); CompositeTargetHandler.prototype.commit = function() { + if (this.ignoreCommitActions) { + this.app.console.log( + 'CompositeTargetHandler.commit()::return early'); + return; + } + // Keys with this attribute set send more than a single character // Like ".com" or "2nd" or (in Catalan) "l·l". var compositeString = this.target.compositeKey; @@ -220,6 +236,12 @@ var PageSwitchingTargetHandler = function(target, app) { PageSwitchingTargetHandler.prototype = Object.create(DefaultTargetHandler.prototype); PageSwitchingTargetHandler.prototype.commit = function() { + if (this.ignoreCommitActions) { + this.app.console.log( + 'PageSwitchingTargetHandler.commit()::return early'); + return; + } + var page = this.target.targetPage; this.app.setLayoutPage(page); @@ -234,30 +256,38 @@ PageSwitchingTargetHandler.prototype.commit = function() { var CapsLockTargetHandler = function(target, app) { DefaultTargetHandler.apply(this, arguments); + + this.isPreviouslyUpperCase = undefined; }; CapsLockTargetHandler.prototype = Object.create(DefaultTargetHandler.prototype); -CapsLockTargetHandler.prototype.capsLockState = 'none'; -CapsLockTargetHandler.prototype.newTargetActivated = false; +CapsLockTargetHandler.prototype.isNewTargetActivated = false; CapsLockTargetHandler.prototype.activate = function() { - if (this.app.upperCaseStateManager.isUpperCaseLocked) { - this.capsLockState = 'upperCaseLocked'; - } else if (this.app.upperCaseStateManager.isUpperCase) { - this.capsLockState = 'upperCase'; - } else { - this.capsLockState = 'none'; - } + this.isPreviouslyUpperCase = this.app.upperCaseStateManager.isUpperCase; + + // Switch to upperCaseLocked state so all combo presses will be upper caps + this.app.upperCaseStateManager.switchUpperCaseState({ + isUpperCaseLocked: true + }); + this.app.feedbackManager.triggerFeedback(this.target); this.app.visualHighlightManager.show(this.target); }; CapsLockTargetHandler.prototype.commit = function() { - // If hold shift to enter upper case, set isUpperCase false when finished - this.app.upperCaseStateManager.switchUpperCaseState({ - isUpperCase: this.newTargetActivated ? false : - !this.app.upperCaseStateManager.isUpperCase, - isUpperCaseLocked: false - }); - this.newTargetActivated = false; - this.capsLockState = 'none'; + if (this.isNewTargetActivated) { + // If the user have ever tap any other keys (i.e. combo keys), + // we should go back to lower case regardless. + this.app.upperCaseStateManager.switchUpperCaseState({ + isUpperCase: false, + isUpperCaseLocked: false + }); + } else { + // Depend on the previous upper case state, single tap should allow user + // switch between upper case and lower case. + this.app.upperCaseStateManager.switchUpperCaseState({ + isUpperCase: !this.isPreviouslyUpperCase, + isUpperCaseLocked: false + }); + } this.app.visualHighlightManager.hide(this.target); }; CapsLockTargetHandler.prototype.doubleTap = function() { @@ -267,11 +297,7 @@ CapsLockTargetHandler.prototype.doubleTap = function() { this.app.visualHighlightManager.hide(this.target); }; CapsLockTargetHandler.prototype.newTargetActivate = function() { - this.newTargetActivated = true; - this.app.upperCaseStateManager.switchUpperCaseState({ - isUpperCaseLocked: true - }); - IMERender.highlightKey(this.target, { capsLockState: this.capsLockState }); + this.isNewTargetActivated = true; }; var SwitchKeyboardTargetHandler = function(target, app) { @@ -302,6 +328,12 @@ var ToggleCandidatePanelTargetHandler = function(target, app) { ToggleCandidatePanelTargetHandler.prototype = Object.create(DefaultTargetHandler.prototype); ToggleCandidatePanelTargetHandler.prototype.commit = function() { + if (this.ignoreCommitActions) { + this.app.console.log( + 'ToggleCandidatePanelTargetHandler.commit()::return early'); + return; + } + this.app.candidatePanelManager.toggleFullPanel(); this.app.visualHighlightManager.hide(this.target); @@ -313,6 +345,12 @@ var DismissSuggestionsTargetHandler = function(target, app) { DismissSuggestionsTargetHandler.prototype = Object.create(DefaultTargetHandler.prototype); DismissSuggestionsTargetHandler.prototype.commit = function() { + if (this.ignoreCommitActions) { + this.app.console.log( + 'DismissSuggestionsTargetHandler.commit()::return early'); + return; + } + var engine = this.app.inputMethodManager.currentIMEngine; if (typeof engine.dismissSuggestions === 'function') { engine.dismissSuggestions(); diff --git a/apps/keyboard/js/keyboard/target_handlers_manager.js b/apps/keyboard/js/keyboard/target_handlers_manager.js index ba96c9161a4a..2cc62a4882c2 100644 --- a/apps/keyboard/js/keyboard/target_handlers_manager.js +++ b/apps/keyboard/js/keyboard/target_handlers_manager.js @@ -64,8 +64,8 @@ TargetHandlersManager.prototype.stop = function() { // not start or end the handler/active target, so it was not mentioned in the // above list. // "newTargetActivate" is similar to "longpress", it is an optional step too, -// so it was not mentioned in the above list. When newTargetActivate is called, -// isUpperCase will be set to true, and hold the icon's background. +// so it was not mentioned in the above list. newTargetActivate is called on +// the current target(s)when there is a new target is about to be activated. // // Please note that since we are using target (an abstract key object associated // with one DOM element) as the identifier of handlers, we do not assign new diff --git a/apps/keyboard/js/render.js b/apps/keyboard/js/render.js index 542c6d9f0940..5435e937bbd5 100644 --- a/apps/keyboard/js/render.js +++ b/apps/keyboard/js/render.js @@ -318,26 +318,11 @@ var IMERender = (function() { if (!options.showUpperCase) { keyElem.classList.add('lowercase'); } - // Show highlight locked background. - switch (options.capsLockState) { - case 'upperCaseLocked': - keyElem.classList.add('highlight-locked-uppercaselocked'); - break; - case 'upperCase': - keyElem.classList.add('highlight-locked-uppercase'); - break; - case 'none': - keyElem.classList.add('highlight-locked-none'); - break; - } }; // Unhighlight a key var unHighlightKey = function kr_unHighlightKey(key) { var keyElem = targetObjDomMap.get(key); - keyElem.classList.remove('highlight-locked-uppercaselocked'); - keyElem.classList.remove('highlight-locked-uppercase'); - keyElem.classList.remove('highlight-locked-none'); keyElem.classList.remove('highlighted'); keyElem.classList.remove('lowercase'); }; From 401cf521549e5599c48ac3875023655051115152 Mon Sep 17 00:00:00 2001 From: Timothy Guan-tin Chien Date: Tue, 30 Sep 2014 11:59:36 +0800 Subject: [PATCH 3/5] WIP - Revert style changes --- apps/keyboard/style/keyboard.css | 48 ++++---------------------------- 1 file changed, 6 insertions(+), 42 deletions(-) diff --git a/apps/keyboard/style/keyboard.css b/apps/keyboard/style/keyboard.css index 0f1549a7ac46..2cd483234ed0 100644 --- a/apps/keyboard/style/keyboard.css +++ b/apps/keyboard/style/keyboard.css @@ -179,39 +179,6 @@ button::-moz-focus-inner { left: 0; } -/* Rules for hold shift to enter upper case */ -.keyboard-key.highlight-locked-uppercaselocked { - background-color: #4a5255; -} - -.keyboard-key.highlight-locked-uppercaselocked > .visual-wrapper { - box-shadow: 0 0.4rem 0 #00caf2; -} - -.keyboard-key.highlight-locked-none > .visual-wrapper > .key-element { - color: #00b8d6; -} - -.keyboard-key.highlight-locked-uppercase { - background-color: #00caf2; -} - -.keyboard-key.highlight-locked-uppercase > .visual-wrapper { - box-shadow: 0 0 0 #00caf2; -} - -.keyboard-key.highlight-locked-uppercase > .visual-wrapper > .key-element { - color: #00b8d6; - border-right-color: transparent; -} - -.keyboard-key.highlight-locked-none > .visual-wrapper { - box-shadow: 0 0 0 #00caf2; -} - -.keyboard-key.highlight-locked-none > .visual-wrapper > .key-element { - color: #00b8d6; -} /* Special keys */ .keyboard-key.special-key > .visual-wrapper > .key-element { @@ -219,15 +186,12 @@ button::-moz-focus-inner { right: 0; bottom: 0; left: 0; - font: 500 1.5rem/4.3rem 'Keyboard Symbols', sans-serif; -} - -.keyboard-key.special-key:not([class*='highlight-locked']) > .visual-wrapper > .key-element { color: #abb0b1; + font: 500 1.5rem/4.3rem 'Keyboard Symbols', sans-serif; } /* Highlight for special keys */ -.keyboard-key.special-key.highlighted:not([class*='highlight-locked']) > .visual-wrapper > .key-element { +.keyboard-key.special-key.highlighted > .visual-wrapper > .key-element { color: #00b8d6; } @@ -279,22 +243,22 @@ button::-moz-focus-inner { /* Key states */ /* Active key, used for shift key - uppercase */ -.keyboard-key.kbr-key-active:not([class*='highlight-locked']) { +.keyboard-key.kbr-key-active { background-color: #00caf2; } -.keyboard-key.kbr-key-active:not([class*='highlight-locked']) > .visual-wrapper > .key-element { +.keyboard-key.kbr-key-active > .visual-wrapper > .key-element { color: #fff; border-right-color: transparent; } /* Caps lock case */ -.keyboard-key.special-key.kbr-key-hold:not([class*='highlight-locked']) > .visual-wrapper > .key-element { +.keyboard-key.special-key.kbr-key-hold > .visual-wrapper > .key-element { color: #00caf2; } /* The underline for caps lock */ -.keyboard-key.kbr-key-hold:not([class*='highlight-locked']) > .visual-wrapper { +.keyboard-key.kbr-key-hold > .visual-wrapper { box-shadow: 0 0.4rem 0 #00caf2; } From 14bb1e2c72634ec9354827b8752e1390c31088f4 Mon Sep 17 00:00:00 2001 From: Timothy Guan-tin Chien Date: Tue, 30 Sep 2014 12:09:37 +0800 Subject: [PATCH 4/5] WIP - Prevent caps lock style from applying to pressed shift --- apps/keyboard/style/keyboard.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/keyboard/style/keyboard.css b/apps/keyboard/style/keyboard.css index 2cd483234ed0..2c072b0544d4 100644 --- a/apps/keyboard/style/keyboard.css +++ b/apps/keyboard/style/keyboard.css @@ -253,12 +253,12 @@ button::-moz-focus-inner { } /* Caps lock case */ -.keyboard-key.special-key.kbr-key-hold > .visual-wrapper > .key-element { +.keyboard-key.special-key.kbr-key-hold:not(.highlighted) > .visual-wrapper > .key-element { color: #00caf2; } /* The underline for caps lock */ -.keyboard-key.kbr-key-hold > .visual-wrapper { +.keyboard-key.kbr-key-hold:not(.highlighted) > .visual-wrapper { box-shadow: 0 0.4rem 0 #00caf2; } @@ -303,7 +303,7 @@ and displays the list of alternatives. */ overflow: hidden; text-align: left; /* Special hack to make the keys in the menu flow upwards. */ - transform: rotateX(180deg); + transform: rotateX(180deg); margin-left: -1.0rem; /* because the last child is wider than others */ } From 3bcbba833a1bb909a7384aa1b64986b89c9aec3a Mon Sep 17 00:00:00 2001 From: Timothy Guan-tin Chien Date: Wed, 1 Oct 2014 15:04:28 +0800 Subject: [PATCH 5/5] Update comments --- apps/keyboard/js/keyboard/target_handlers_manager.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/keyboard/js/keyboard/target_handlers_manager.js b/apps/keyboard/js/keyboard/target_handlers_manager.js index 2cc62a4882c2..8811e761bd54 100644 --- a/apps/keyboard/js/keyboard/target_handlers_manager.js +++ b/apps/keyboard/js/keyboard/target_handlers_manager.js @@ -65,13 +65,13 @@ TargetHandlersManager.prototype.stop = function() { // above list. // "newTargetActivate" is similar to "longpress", it is an optional step too, // so it was not mentioned in the above list. newTargetActivate is called on -// the current target(s)when there is a new target is about to be activated. +// the current target(s) when there is a new target is about to be activated. // // Please note that since we are using target (an abstract key object associated // with one DOM element) as the identifier of handlers, we do not assign new -// handler if there are two touches on the same element. Currently that cannot -// happen because of what done in bug 985855, however in the future that will -// change (and these handlers needs to) to adopt bug 985853 (Combo key). +// handler if there are two touches on the same element. If two touches happens +// on one (maybe quite big) button, the same method on the same handler will +// be called again with a console warning. TargetHandlersManager.prototype._callTargetAction = function(action, setHandler, deleteHandler,