Permalink
Browse files

Fixes #2407 - Merge branch 'fix-2407'

  • Loading branch information...
2 parents 2ec7761 + b72db67 commit edef4ae33085be4d0eaecca25ae3620bb9ca0bd7 @arian arian committed Dec 19, 2012
Showing with 15 additions and 3 deletions.
  1. +1 −1 Source/Element/Element.Delegation.js
  2. +14 −2 Specs/1.4client/Element/Element.Delegation.html
@@ -175,7 +175,7 @@ var delegation = {
if (_map.remove) _map.remove(this, _uid);
delete stored[_uid];
storage[_type] = stored;
- return removeEvent.call(this, type, delegator);
+ return removeEvent.call(this, type, delegator, _map.capture);
}
var __uid, s;
@@ -155,14 +155,26 @@ <h1>Focus / Blur</h1>
<input type="text" />
</div>
+ <p>
+ <button onclick="focusAdd()">Add Events</button> -
+ <button onclick="focusRemove()">Remove Events</button>
+ </p>
+
<script>
- $('focus_blur').addEvents({
+ var focusEvents = {
'focus:relay(input)': log.pass(['focus', true]),
'blur:relay(input)': function(){
log('blur', true);
log('---');
}
- })
+ };
+ $('focus_blur').addEvents(focusEvents);
+ var focusAdd = function(){
+ $('focus_blur').addEvents(focusEvents);
+ }
+ var focusRemove = function(){
+ $('focus_blur').removeEvents(focusEvents);
+ }
</script>
<h1>Submit / Reset</h1>

0 comments on commit edef4ae

Please sign in to comment.