Fix problem with styles loop.

This commit is contained in:
Patrick Filler 2011-07-12 14:16:36 -04:00
parent 95a993ba8e
commit e353d5d289

View file

@ -553,7 +553,7 @@ class Chosen
style_block = "position:absolute; left: -1000px; top: -1000px; display:none;" 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'] styles = ['font-size','font-style', 'font-weight', 'font-family','line-height', 'text-transform', 'letter-spacing']
for style of styles for style in styles
style_block += style + ":" + @search_field.getStyle(style) + ";" style_block += style + ":" + @search_field.getStyle(style) + ";"
div = new Element('div', { 'style' : style_block }).update(@search_field.value) div = new Element('div', { 'style' : style_block }).update(@search_field.value)