Skip to content

Commit

Permalink
🐛 Opening would be prevented after opening a definition
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaslindstrom committed Dec 2, 2015
1 parent 6085162 commit cdf0f05
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions lib/extensions/Definition.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,9 @@
# Reset picker on close, and clear the event
# TODO handle this on the ColorPicker itself, maybe?
onClose = ->
colorPicker.canOpen = no

onTransitionEnd = ->
$colorPicker.setHeight _oldHeight
$colorPicker.el.removeEventListener 'transitionend', onTransitionEnd
$colorPicker.removeClass 'view--definition'
colorPicker.canOpen = yes
$colorPicker.el.addEventListener 'transitionend', onTransitionEnd
colorPicker.canOpen = yes
$colorPicker.setHeight _oldHeight
$colorPicker.removeClass 'view--definition'

# TODO: This kinda goes against the 'no strings' thing
colorPicker.Emitter.off 'close', onClose
Expand Down

0 comments on commit cdf0f05

Please sign in to comment.