mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 07:56:06 +02:00
MDL-75848 editor_atto: fix console error when clicking toolbar menu.
This commit is contained in:
parent
046e48c49c
commit
3bf355e37a
@ -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
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user