Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

resolves #403 - preventDefault for click on anchor

  • Loading branch information...
commit cf23dc522df8ae6e4c8f960435ce4a46c2297cd1 1 parent 47bc141
@marknadig marknadig authored
Showing with 4 additions and 0 deletions.
  1. +2 −0  coffee/chosen.jquery.coffee
  2. +2 −0  coffee/chosen.proto.coffee
View
2  coffee/chosen.jquery.coffee
@@ -90,6 +90,8 @@ class Chosen extends AbstractChosen
if @is_multiple
@search_choices.click (evt) => this.choices_click(evt)
@search_field.focus (evt) => this.input_focus(evt)
+ else
+ @container.click (evt) => evt.preventDefault() # gobble click of anchor
search_field_disabled: ->
@is_disabled = @form_field_jq[0].disabled
View
2  coffee/chosen.proto.coffee
@@ -83,6 +83,8 @@ class Chosen extends AbstractChosen
if @is_multiple
@search_choices.observe "click", (evt) => this.choices_click(evt)
@search_field.observe "focus", (evt) => this.input_focus(evt)
+ else
+ @container.observe "click", (evt) => evt.preventDefault() # gobble click of anchor
search_field_disabled: ->
@is_disabled = @form_field.disabled
Please sign in to comment.
Something went wrong with that request. Please try again.