Bug 854075 - Use mouseover instead of mouseenter for newtab page; r=jaws
--- a/browser/base/content/newtab/sites.js
+++ b/browser/base/content/newtab/sites.js
@@ -139,17 +139,17 @@ Site.prototype = {
/**
* Adds event handlers for the site and its buttons.
*/
_addEventHandlers: function Site_addEventHandlers() {
// Register drag-and-drop event handlers.
this._node.addEventListener("dragstart", this, false);
this._node.addEventListener("dragend", this, false);
- this._node.addEventListener("mouseenter", this, false);
+ this._node.addEventListener("mouseover", this, false);
let controls = this.node.querySelectorAll(".newtab-control");
for (let i = 0; i < controls.length; i++)
controls[i].addEventListener("click", this, false);
},
/**
* Speculatively opens a connection to the current site.
@@ -169,17 +169,18 @@ Site.prototype = {
aEvent.preventDefault();
if (aEvent.target.classList.contains("newtab-control-block"))
this.block();
else if (this.isPinned())
this.unpin();
else
this.pin();
break;
- case "mouseenter":
+ case "mouseover":
+ this._node.removeEventListener("mouseover", this, false);
this._speculativeConnect();
break;
case "dragstart":
gDrag.start(this, aEvent);
break;
case "drag":
gDrag.drag(this, aEvent);
break;