mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Make sure that a command is enabled in doCommand()
Make sure that a command is enabled in doCommand()
This commit is contained in:
parent
23f9738837
commit
2688c91962
@ -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":
|
||||
|
Loading…
Reference in New Issue
Block a user