Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Define a `relatedTarget` property on extended mouseenter/mouseleave e…

…vents in IE's legacy event system. [#708 state:resolved] (Walter Smith, Tobie Langel, Andrew Dupont)
  • Loading branch information...
commit f71bb853f70eed54fd4b4bbfeb5a8ea72874c9ff 1 parent aeb4532
@savetheclocktower savetheclocktower authored
Showing with 12 additions and 3 deletions.
  1. +2 −0  CHANGELOG
  2. +10 −3 src/dom/event.js
View
2  CHANGELOG
@@ -1,3 +1,5 @@
+* Define a `relatedTarget` property on extended mouseenter/mouseleave events in IE's legacy event system. [#708 state:resolved] (Walter Smith, Tobie Langel, Andrew Dupont)
+
* Fix odd behavior with `new Element('select')` in IE6-7. [#480 state:resolved] (Bruce Harris, kangax, Andrew Dupont)
* Extend BUTTON elements with everything defined in Form.Element.Methods. Ensure BUTTON elements are traversed in Form.getElements and serialized in Form.serialize. (Luis Gomez, Samuel Lebeau, kangax, Andrew Dupont)
View
13 src/dom/event.js
@@ -370,9 +370,16 @@
function _relatedTarget(event) {
var element;
switch (event.type) {
- case 'mouseover': element = event.fromElement; break;
- case 'mouseout': element = event.toElement; break;
- default: return null;
+ case 'mouseover':
+ case 'mouseenter':
+ element = event.fromElement;
+ break;
+ case 'mouseout':
+ case 'mouseleave':
+ element = event.toElement;
+ break;
+ default:
+ return null;
}
return Element.extend(element);
}
Please sign in to comment.
Something went wrong with that request. Please try again.