Skip to content

Commit

Permalink
Actually use the detected event name
Browse files Browse the repository at this point in the history
  • Loading branch information
leereamsnyder committed Jun 13, 2014
1 parent 684ee56 commit 253c3b3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions coffee/drop.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,11 @@ createContext = (options={}) ->
removeClass @drop, "#{ drop.classPrefix }-open"
removeClass @drop, "#{ drop.classPrefix }-after-open"

@drop.addEventListener 'transitionend', handler = =>
@drop.addEventListener transitionEndEvent, handler = =>
unless hasClass @drop, "#{ drop.classPrefix }-open"
removeClass @drop, "#{ drop.classPrefix }-open-transitionend"

@drop.removeEventListener 'transitionend', handler
@drop.removeEventListener transitionEndEvent, handler

@trigger 'close'

Expand Down
4 changes: 2 additions & 2 deletions drop.js
Original file line number Diff line number Diff line change
Expand Up @@ -1750,11 +1750,11 @@ return this.Tether;
}
removeClass(this.drop, "" + drop.classPrefix + "-open");
removeClass(this.drop, "" + drop.classPrefix + "-after-open");
this.drop.addEventListener('transitionend', handler = function() {
this.drop.addEventListener(transitionEndEvent, handler = function() {
if (!hasClass(_this.drop, "" + drop.classPrefix + "-open")) {
removeClass(_this.drop, "" + drop.classPrefix + "-open-transitionend");
}
return _this.drop.removeEventListener('transitionend', handler);
return _this.drop.removeEventListener(transitionEndEvent, handler);
});
this.trigger('close');
if ((_ref1 = this.tether) != null) {
Expand Down
Loading

0 comments on commit 253c3b3

Please sign in to comment.