Skip to content

Commit

Permalink
Merge pull request #2119 from DaanDD/master
Browse files Browse the repository at this point in the history
Fix touch event propagation
  • Loading branch information
pfiller committed Mar 4, 2015
2 parents a21cb8e + 37b87f8 commit 32a428d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions coffee/chosen.jquery.coffee
Expand Up @@ -68,8 +68,8 @@ class Chosen extends AbstractChosen
@form_field_jq.trigger("chosen:ready", {chosen: this})

register_observers: ->
@container.bind 'touchstart.chosen', (evt) => this.container_mousedown(evt); return
@container.bind 'touchend.chosen', (evt) => this.container_mouseup(evt); return
@container.bind 'touchstart.chosen', (evt) => this.container_mousedown(evt); evt.preventDefault()
@container.bind 'touchend.chosen', (evt) => this.container_mouseup(evt); evt.preventDefault()

@container.bind 'mousedown.chosen', (evt) => this.container_mousedown(evt); return
@container.bind 'mouseup.chosen', (evt) => this.container_mouseup(evt); return
Expand Down
4 changes: 2 additions & 2 deletions coffee/chosen.proto.coffee
Expand Up @@ -51,8 +51,8 @@ class @Chosen extends AbstractChosen
@form_field.fire("chosen:ready", {chosen: this})

register_observers: ->
@container.observe "touchstart", (evt) => this.container_mousedown(evt)
@container.observe "touchend", (evt) => this.container_mouseup(evt)
@container.observe "touchstart", (evt) => this.container_mousedown(evt); evt.preventDefault()
@container.observe "touchend", (evt) => this.container_mouseup(evt); evt.preventDefault()

@container.observe "mousedown", (evt) => this.container_mousedown(evt)
@container.observe "mouseup", (evt) => this.container_mouseup(evt)
Expand Down

0 comments on commit 32a428d

Please sign in to comment.