Javascript pageY issue with Microsoft Edge browser
问题 I want to create a simple script that will detect if user mouse leave window. Solution is already described here by using mouseout event. The problem with this solution is that it will trigger action also if user goes with mouse to scroller. So I added extra if condition e.pageY < jQuery(window).scrollTop() to this code: addEvent(document, "mouseout", function(e) { e = e ? e : window.event; var from = e.relatedTarget || e.toElement; if ((!from || from.nodeName == "HTML") && e.pageY < jQuery