From d9196c71c4637a7a7745d641c2a450a5a9eee728 Mon Sep 17 00:00:00 2001 From: Patrick Filler Date: Tue, 28 Jun 2011 18:15:59 -0400 Subject: [PATCH] Include search field border / padding when calculating desired width. --- chosen/chosen.proto.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chosen/chosen.proto.js b/chosen/chosen.proto.js index 6ff1e77..ebfa162 100644 --- a/chosen/chosen.proto.js +++ b/chosen/chosen.proto.js @@ -96,7 +96,7 @@ Chosen.prototype = { if( !this.is_multiple ){ this.search_container = this.container.down('div.chzn-search'); this.selected_item = this.container.down('.chzn-single'); - var sf_width = (dd_width - get_side_border_padding(this.search_container)); + var sf_width = (dd_width - get_side_border_padding(this.search_container) - get_side_border_padding(this.search_field)); this.search_field.setStyle( {"width" : sf_width + "px"} ); } else{