Bug 1266134 - Prevent browser_computed_keybindings_01.js from opening options panel. r=jryans

MozReview-Commit-ID: LXCWjQwkwUN

--HG--
extra : rebase_source : 97e106007719319a1214b16ae29be707fcf2e7e7
This commit is contained in:
Alexandre Poirot 2016-09-15 15:08:11 -07:00
Родитель 7c35371232
Коммит 55a228567f
2 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -939,6 +939,9 @@ PropertyView.prototype = {
});
this.shortcuts.on("F1", (name, event) => {
this.mdnLinkClick(event);
// Prevent opening the options panel
event.preventDefault();
event.stopPropagation();
});
this.shortcuts.on("Return", (name, event) => this.onMatchedToggle(event));
this.shortcuts.on("Space", (name, event) => this.onMatchedToggle(event));
@ -1170,8 +1173,6 @@ PropertyView.prototype = {
let browserWin = inspector.target.tab.ownerDocument.defaultView;
browserWin.openUILinkIn(this.link, "tab");
}
event.preventDefault();
event.stopPropagation();
},
/**

Просмотреть файл

@ -73,7 +73,7 @@ function checkHelpLinkKeybinding(view) {
let def = defer();
let propView = getFirstVisiblePropertyView(view);
propView.mdnLinkClick = function () {
propView.mdnLinkClick = function (event) {
ok(true, "Pressing F1 opened the MDN link");
def.resolve();
};