Chosen jQuery version uses outerWidth on initial load.

This commit is contained in:
Patrick Filler 2011-09-12 16:03:29 -04:00
parent eb8ee7366d
commit 15b9b5136f
3 changed files with 3 additions and 3 deletions

View file

@ -54,7 +54,7 @@
var container_div, dd_top, dd_width, sf_width;
this.container_id = this.form_field.id.length ? this.form_field.id.replace(/(:|\.)/g, '_') : this.generate_field_id();
this.container_id += "_chzn";
this.f_width = this.form_field_jq.width();
this.f_width = this.form_field_jq.outerWidth();
this.default_text = this.form_field_jq.data('placeholder') ? this.form_field_jq.data('placeholder') : this.default_text_default;
container_div = $("<div />", {
id: this.container_id,

File diff suppressed because one or more lines are too long

View file

@ -44,7 +44,7 @@ class Chosen
@container_id = if @form_field.id.length then @form_field.id.replace(/(:|\.)/g, '_') else this.generate_field_id()
@container_id += "_chzn"
@f_width = @form_field_jq.width()
@f_width = @form_field_jq.outerWidth()
@default_text = if @form_field_jq.data 'placeholder' then @form_field_jq.data 'placeholder' else @default_text_default