This commit is contained in:
Jun Pataleta 2022-11-02 13:20:12 +08:00
commit b2368a421b
4 changed files with 8 additions and 8 deletions

View File

@ -601,9 +601,9 @@ EditorPluginButtons.prototype = {
return;
}
// Ensure menu button was clicked, and isn't itself disabled.
var menuButton = e.currentTarget.ancestor('button', true);
if (menuButton.hasAttribute(DISABLED)) {
// Exit early if the clicked button was disabled.
if (menuButton === null || menuButton.hasAttribute(DISABLED)) {
return;
}

File diff suppressed because one or more lines are too long

View File

@ -599,9 +599,9 @@ EditorPluginButtons.prototype = {
return;
}
// Ensure menu button was clicked, and isn't itself disabled.
var menuButton = e.currentTarget.ancestor('button', true);
if (menuButton.hasAttribute(DISABLED)) {
// Exit early if the clicked button was disabled.
if (menuButton === null || menuButton.hasAttribute(DISABLED)) {
return;
}

View File

@ -451,9 +451,9 @@ EditorPluginButtons.prototype = {
return;
}
// Ensure menu button was clicked, and isn't itself disabled.
var menuButton = e.currentTarget.ancestor('button', true);
if (menuButton.hasAttribute(DISABLED)) {
// Exit early if the clicked button was disabled.
if (menuButton === null || menuButton.hasAttribute(DISABLED)) {
return;
}