rem: Utils.fireMouseEventOn(element, "mouseup"); 
add: Utils.fireMouseEventOn(this.location, element, "mouseup"); 
context: FirefoxDriver.prototype.click = function(position) {    var element = Utils.getElementAt(position);    if (!element) {        this.server.respond("click");        return;    }    // Attach a listener so that we can wait until any page load this causes to complete    var server = this.server;    var clickListener = new WebLoadingListener(function(event) {        server.respond("click");    });    element.focus();    Utils.fireMouseEventOn(element, "mousedown");    // Now do the click    if (element["click"]) {        element.click();    } else {        // Send the mouse event too. Not sure if this will cause the thing to be double clicked....        Utils.fireMouseEventOn(element, "click");    }    Utils.fireMouseEventOn(element, "mouseup");        var checkForLoad = function() {        // Returning should be handled by the click listener, unless we're not actually loading something. Do a check and return if we are.        // There's a race condition here, in that the click event and load may have finished before we get here. For now, let's pretend that        // doesn't happen. The other race condition is that we make this check before the load has begun. With all the javascript out there,        // this might actually be a bit of a problem.        var docLoaderService = Utils.getBrowser().webProgress        if (!docLoaderService.isLoadingDocument) {            WebLoadingListener.removeListener(clickListener);            server.respond("click");        }    }    Utils.getBrowser().contentWindow.setTimeout(checkForLoad, 50);};
meta: 3428	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/3428/3aa848daac3cf6b346c932bafbb7bfd763430786/wrappedElement.js/clean/firefox/src/extension/content/wrappedElement.js