зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1032984 - Fix Shift+Home/End/PageUp/PageDown to highlight value. r=bgrins
--HG-- extra : rebase_source : ce1c811725e43245729b2bf2b02cdf77257151ae
This commit is contained in:
Родитель
dd6417362f
Коммит
be62ea33bc
|
@ -882,6 +882,14 @@ InplaceEditor.prototype = {
|
||||||
increment *= smallIncrement;
|
increment *= smallIncrement;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Use default cursor movement rather than providing auto-suggestions.
|
||||||
|
if (aEvent.keyCode === Ci.nsIDOMKeyEvent.DOM_VK_HOME
|
||||||
|
|| aEvent.keyCode === Ci.nsIDOMKeyEvent.DOM_VK_END
|
||||||
|
|| aEvent.keyCode === Ci.nsIDOMKeyEvent.DOM_VK_PAGE_UP
|
||||||
|
|| aEvent.keyCode === Ci.nsIDOMKeyEvent.DOM_VK_PAGE_DOWN) {
|
||||||
|
this._preventSuggestions = true;
|
||||||
|
}
|
||||||
|
|
||||||
let cycling = false;
|
let cycling = false;
|
||||||
if (increment && this._incrementValue(increment) ) {
|
if (increment && this._incrementValue(increment) ) {
|
||||||
this._updateSize();
|
this._updateSize();
|
||||||
|
|
|
@ -42,6 +42,10 @@ let testData = [
|
||||||
["VK_BACK_SPACE", "di", -1, 0],
|
["VK_BACK_SPACE", "di", -1, 0],
|
||||||
["VK_BACK_SPACE", "d", -1, 0],
|
["VK_BACK_SPACE", "d", -1, 0],
|
||||||
["VK_BACK_SPACE", "", -1, 0],
|
["VK_BACK_SPACE", "", -1, 0],
|
||||||
|
["VK_HOME", "", -1, 0],
|
||||||
|
["VK_END", "", -1, 0],
|
||||||
|
["VK_PAGE_UP", "", -1, 0],
|
||||||
|
["VK_PAGE_DOWN", "", -1, 0],
|
||||||
["f", "fill", 0, MAX_ENTRIES],
|
["f", "fill", 0, MAX_ENTRIES],
|
||||||
["i", "fill", 0, 4],
|
["i", "fill", 0, 4],
|
||||||
["VK_LEFT", "fill", -1, 0],
|
["VK_LEFT", "fill", -1, 0],
|
||||||
|
@ -76,8 +80,8 @@ function* testCompletion([key, completion, index, total], editor, view) {
|
||||||
|
|
||||||
let onSuggest;
|
let onSuggest;
|
||||||
|
|
||||||
if (/(left|right|back_space|escape)/ig.test(key)) {
|
if (/(left|right|back_space|escape|home|end|page_up|page_down)/ig.test(key)) {
|
||||||
info("Adding event listener for left|right|back_space|escape keys");
|
info("Adding event listener for left|right|back_space|escape|home|end|page_up|page_down keys");
|
||||||
onSuggest = once(editor.input, "keypress");
|
onSuggest = once(editor.input, "keypress");
|
||||||
} else {
|
} else {
|
||||||
info("Waiting for after-suggest event on the editor");
|
info("Waiting for after-suggest event on the editor");
|
||||||
|
|
Загрузка…
Ссылка в новой задаче