mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
fix(mouseenter): FF no longer throws exceptions
This commit is contained in:
parent
1d26acb874
commit
43d15f830f
2 changed files with 4 additions and 6 deletions
|
|
@ -559,14 +559,12 @@ forEach({
|
|||
bindFn(element, 'mouseover', function(event) {
|
||||
counter++;
|
||||
if (counter == 1) {
|
||||
event.type = 'mouseenter';
|
||||
mouseenter(event);
|
||||
}
|
||||
});
|
||||
bindFn(element, 'mouseout', function(event) {
|
||||
counter --;
|
||||
if (counter == 0) {
|
||||
event.type = 'mouseleave';
|
||||
mouseleave(event);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -691,13 +691,13 @@ describe('jqLite', function() {
|
|||
|
||||
parent.bind('mouseenter', function() { log += 'parentEnter;'; });
|
||||
parent.bind('mouseleave', function() { log += 'parentLeave;'; });
|
||||
parent.mouseover = function(event) { parent.data('bind').mouseover(event || {}); };
|
||||
parent.mouseout = function(event) { parent.data('bind').mouseout(event || {}); };
|
||||
parent.mouseover = function() { browserTrigger(parent, 'mouseover'); };
|
||||
parent.mouseout = function() { browserTrigger(parent, 'mouseout'); };
|
||||
|
||||
child.bind('mouseenter', function() { log += 'childEnter;'; });
|
||||
child.bind('mouseleave', function() { log += 'childLeave;'; });
|
||||
child.mouseover = function(event) { child.data('bind').mouseover(event || {}); };
|
||||
child.mouseout = function(event) { child.data('bind').mouseout(event || {}); };
|
||||
child.mouseover = function() { browserTrigger(child, 'mouseover'); };
|
||||
child.mouseout = function() { browserTrigger(child, 'mouseout'); };
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue