Bug 335077 - Middle click on back button does not work. r=mconnor.

This commit is contained in:
mozilla.mano%sent.com 2006-04-24 14:09:00 +00:00
Родитель 1f6633c549
Коммит 30713d2b78
1 изменённых файлов: 3 добавлений и 9 удалений

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

@ -247,16 +247,10 @@ function checkForMiddleClick(node, event)
if (event.button == 1) {
/* Execute the node's oncommand.
*
* Using eval() because of bug 246720. Would like to use node.oncommand(event).
*
* Since we're using eval():
*
* |event| is correct because the name of this function's formal parameter matches
* the automatic name of the formal parameter for oncommand, |event|.
*
* |this| is incorrect. To make it correct, we would have to use Function.call.
* XXX: we should use node.oncommand(event) once bug 246720 is fixed.
*/
eval(node.getAttribute("oncommand"));
var fn = new Function("event", node.getAttribute("oncommand"));
fn.call(node, event);
// If the middle-click was on part of a menu, close the menu.
// (Menus close automatically with left-click but not with middle-click.)