From 4885cb36b240ae69452ffb266180eafb15c69124 Mon Sep 17 00:00:00 2001 From: Patrick Filler Date: Fri, 19 Jul 2013 15:34:09 -0400 Subject: [PATCH] Replace `javascript:void(0)` with `#` Fixes: - issues with content security policy (#1215) - onbeforeunload in IE (#403) We don't need to add a preventDefault because all clicks on .chzn-container already have a preventDefault --- coffee/chosen.jquery.coffee | 2 +- coffee/chosen.proto.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/coffee/chosen.jquery.coffee b/coffee/chosen.jquery.coffee index 562abee33eb..7caffe1304d 100644 --- a/coffee/chosen.jquery.coffee +++ b/coffee/chosen.jquery.coffee @@ -40,7 +40,7 @@ class Chosen extends AbstractChosen if @is_multiple @container.html '
' else - @container.html '' + @default_text + '
' + @container.html '' + @default_text + '
' @form_field_jq.hide().after @container @dropdown = @container.find('div.chzn-drop').first() diff --git a/coffee/chosen.proto.coffee b/coffee/chosen.proto.coffee index 19a58f8ac00..78b914827c5 100644 --- a/coffee/chosen.proto.coffee +++ b/coffee/chosen.proto.coffee @@ -13,7 +13,7 @@ class Chosen extends AbstractChosen super() # HTML Templates - @single_temp = new Template('#{default}
') + @single_temp = new Template('#{default}
') @multi_temp = new Template('
') @no_results_temp = new Template('
  • ' + @results_none_found + ' "#{terms}"
  • ')