diff --git a/coffee/chosen.jquery.coffee b/coffee/chosen.jquery.coffee index 004e0441d6d..95e4051b5ac 100644 --- a/coffee/chosen.jquery.coffee +++ b/coffee/chosen.jquery.coffee @@ -491,8 +491,8 @@ class Chosen extends AbstractChosen h = 0 w = 0 - style_block = "position:absolute; left: -1000px; top: -1000px; display:none;" - styles = ['font-size','font-style', 'font-weight', 'font-family','line-height', 'text-transform', 'letter-spacing'] + style_block = "position:absolute; left: -1000px; top: -1000px; display: none; white-space: pre;" + styles = ['font-size', 'font-style', 'font-weight', 'font-family', 'line-height', 'text-transform', 'letter-spacing'] for style in styles style_block += style + ":" + @search_field.css(style) + ";" diff --git a/coffee/chosen.proto.coffee b/coffee/chosen.proto.coffee index e5b1185d674..f3b3522554e 100644 --- a/coffee/chosen.proto.coffee +++ b/coffee/chosen.proto.coffee @@ -486,8 +486,8 @@ class @Chosen extends AbstractChosen h = 0 w = 0 - style_block = "position:absolute; left: -1000px; top: -1000px; display:none;" - styles = ['font-size','font-style', 'font-weight', 'font-family','line-height', 'text-transform', 'letter-spacing'] + style_block = "position:absolute; left: -1000px; top: -1000px; display: none; white-space: pre;" + styles = ['font-size', 'font-style', 'font-weight', 'font-family', 'line-height', 'text-transform', 'letter-spacing'] for style in styles style_block += style + ":" + @search_field.getStyle(style) + ";"