Skip to content

Commit

Permalink
fixes slab#76
Browse files Browse the repository at this point in the history
  • Loading branch information
jhchen committed May 14, 2014
1 parent 0588f34 commit bd5e608
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/lib/picker.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ Normalizer = require('../normalizer')


class Picker
@TEMPLATE: '
<span class="sc-picker-label"></span>
<span class="sc-picker-options"></span>'
@TEMPLATE: '<span class="sc-picker-label"></span><span class="sc-picker-options"></span>'

constructor: (@select) ->
@container = @select.ownerDocument.createElement('span')
Expand All @@ -19,8 +17,9 @@ class Picker
return true
)
DOM.addEventListener(@label, 'click', =>
DOM.toggleClass(@container, 'sc-expanded')
return false # Avoid document click handler that closes all dropdowns
_.defer( =>
DOM.toggleClass(@container, 'sc-expanded')
)
)
DOM.addEventListener(@select, 'change', =>
if @select.selectedIndex > -1
Expand Down

0 comments on commit bd5e608

Please sign in to comment.