зеркало из https://github.com/mozilla/gecko-dev.git
Bug 684558 - Key events are processed twice. [r=mfinkle]
This commit is contained in:
Родитель
b5dacd415b
Коммит
e33c5f42f6
|
@ -428,7 +428,7 @@ var BrowserUI = {
|
|||
window.addEventListener("mousedown", this, true);
|
||||
|
||||
// listening escape to dismiss dialog on VK_ESCAPE
|
||||
window.addEventListener("keypress", this, true);
|
||||
window.addEventListener("keypress", this, false);
|
||||
|
||||
// listening AppCommand to handle special keys
|
||||
window.addEventListener("AppCommand", this, true);
|
||||
|
|
|
@ -2085,7 +2085,8 @@ KeyFilter.prototype = {
|
|||
|
||||
let browser = getBrowser();
|
||||
if (browser && browser.active && browser.getAttribute("remote") == "true") {
|
||||
document.getElementById("mainKeyset").setAttribute("disabled", "true");
|
||||
aEvent.stopPropagation();
|
||||
document.getElementById("mainKeyset").setAttribute("disabled", "true");
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -60,7 +60,9 @@ gTests.push({
|
|||
ok(BrowserUI._title.collapsed, "The urlbar title element is not visible");
|
||||
|
||||
waitForNavigationPanel(gCurrentTest.onPopupHidden, true);
|
||||
EventUtils.synthesizeKey("VK_ESCAPE", {}, window);
|
||||
|
||||
// Need to use sendKey instead of synthesizeKey here (bug 684558).
|
||||
EventUtils.sendKey("ESCAPE", window);
|
||||
},
|
||||
|
||||
onPopupHidden: function() {
|
||||
|
@ -108,7 +110,7 @@ gTests.push({
|
|||
runNextTest();
|
||||
}, true);
|
||||
|
||||
EventUtils.synthesizeKey("VK_ESCAPE", {}, window);
|
||||
EventUtils.sendKey("ESCAPE", window);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -137,7 +139,7 @@ gTests.push({
|
|||
is(BrowserUI._edit.readOnly, false, "urlbar should not be readonly after an input");
|
||||
|
||||
waitForNavigationPanel(gCurrentTest.onPopupHidden, true);
|
||||
EventUtils.synthesizeKey("VK_ESCAPE", {}, window);
|
||||
EventUtils.sendKey("ESCAPE", window);
|
||||
},
|
||||
|
||||
onPopupHidden: function() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче