Make sure that a command is enabled in doCommand()

Make sure that a command is enabled in doCommand()
This commit is contained in:
Fabrice Desré 2010-09-23 05:00:00 -04:00
parent 23f9738837
commit 2688c91962

View File

@ -906,10 +906,15 @@ var BrowserUI = {
},
isCommandEnabled : function(cmd) {
let elem = document.getElementById(cmd);
if (elem && (elem.getAttribute("disabled") == "true"))
return false;
return true;
},
doCommand : function(cmd) {
if (!this.isCommandEnabled(cmd))
return;
let browser = getBrowser();
switch (cmd) {
case "cmd_back":