зеркало из https://github.com/mozilla/gecko-dev.git
Bug 344166: checkForMiddleClick should check whether the target node is disabled, r=mano
This commit is contained in:
Родитель
bedd07ca66
Коммит
c0c637a4c2
|
@ -211,6 +211,12 @@ function openUILinkIn( url, where, allowThirdPartyFixup, postData )
|
|||
// e.g. onclick="checkForMiddleClick(this, event);"
|
||||
function checkForMiddleClick(node, event)
|
||||
{
|
||||
// We should be using the disabled property here instead of the attribute,
|
||||
// but some elements that this function is used with don't support it (e.g.
|
||||
// menuitem).
|
||||
if (node.getAttribute("disabled") == "true")
|
||||
return; // Do nothing
|
||||
|
||||
if (event.button == 1) {
|
||||
/* Execute the node's oncommand.
|
||||
*
|
||||
|
|
Загрузка…
Ссылка в новой задаче