Bug 1292081 - Prevents reloading web pages twice when devtools are opened. r=jryans

This commit is contained in:
Alexandre Poirot 2016-08-11 04:14:36 -07:00
parent 872cc6b6e4
commit c2b3985e61

View File

@ -591,7 +591,12 @@ Toolbox.prototype = {
["forceReload2", true]
].forEach(([id, force]) => {
let key = toolboxStrings("toolbox." + id + ".key");
shortcuts.on(key, this.reloadTarget.bind(this, force));
shortcuts.on(key, (name, event) => {
this.reloadTarget(force);
// Prevent Firefox shortcuts from reloading the page
event.preventDefault();
});
});
},