From 1bdd5eb6175ef5109bdaf61f865a75709ff81895 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 18 Sep 2013 20:15:11 +0000 Subject: [PATCH] Size chosen selectboxes even if they are hidden - prevents 0 width chosen selects --- etemplate/js/et2_widget_selectbox.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/etemplate/js/et2_widget_selectbox.js b/etemplate/js/et2_widget_selectbox.js index b921d7300d..a36b3cbd83 100644 --- a/etemplate/js/et2_widget_selectbox.js +++ b/etemplate/js/et2_widget_selectbox.js @@ -555,10 +555,12 @@ var et2_selectbox = et2_inputWidget.extend( { this.input.attr("data-placeholder", this.options.empty_label); } - this.input.css("width",this.options.tags ? "100%":'') - .chosen({ + // Properly size chosen, even if on a hidden tab + var size = egw.getHiddenDimensions(this.input); + this.input.chosen({ inherit_select_classes: true, - search_contains: true + search_contains: true, + width: size.w + "px" }) .change(this.onchange); }