Bug 344166: checkForMiddleClick should check whether the target node is disabled, r=mano

This commit is contained in:
gavin%gavinsharp.com 2006-07-13 10:56:54 +00:00
Родитель bedd07ca66
Коммит c0c637a4c2
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -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.
*