Skip to content
This repository
Browse code

BUGFIX: When Chosen dropdowns are instantiated on hidden tabs, the wi…

…dth is rendered very small and they are unreadable. This is a known bug in Chosen. A change has been proposed at the Chosen page here: harvesthq/chosen#92 but no pull request has been executed.
  • Loading branch information...
commit b9ed6f7f6d388fc451efbada2d1501d667322cb0 1 parent d571cdc
unclecheese authored July 15, 2012 chillu committed July 16, 2012
1  admin/thirdparty/chosen/chosen/chosen.jquery.js
@@ -325,6 +325,7 @@ Copyright (c) 2011 by Harvest
325 325
       this.container_id = this.form_field.id.length ? this.form_field.id.replace(/(:|\.)/g, '_') : this.generate_field_id();
326 326
       this.container_id += "_chzn";
327 327
       this.f_width = this.form_field_jq.outerWidth();
  328
+      if (this.f_width==0) this.f_width = this.form_field_jq.css("width");
328 329
       this.default_text = this.form_field_jq.data('placeholder') ? this.form_field_jq.data('placeholder') : this.default_text_default;
329 330
       container_div = $("<div />", {
330 331
         id: this.container_id,

0 notes on commit b9ed6f7

Please sign in to comment.
Something went wrong with that request. Please try again.