Skip to content

Commit 2cc9cc0

Browse files
authored
Chosen: Remove stale placeholder input values. (#101)
1 parent 6d09208 commit 2cc9cc0

12 files changed

Lines changed: 56 additions & 11 deletions

‎coffee/lib/abstract-chosen.coffee‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,6 @@ class AbstractChosen
558558
role="combobox"
559559
style="width:25px;"
560560
type="text"
561-
value="#{this.escape_html(@default_text)}"
562561
/>
563562
</li>
564563
</ul>

‎dist/js/chosen.jquery.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,6 @@ This file is generated by `grunt build`, do not edit it by hand.
10311031
role="combobox"
10321032
style="width:25px;"
10331033
type="text"
1034-
value="${this.escape_html(this.default_text)}"
10351034
/>
10361035
</li>
10371036
</ul>

‎dist/js/chosen.jquery.min.js‎

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/js/chosen.proto.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,6 @@ This file is generated by `grunt build`, do not edit it by hand.
10311031
role="combobox"
10321032
style="width:25px;"
10331033
type="text"
1034-
value="${this.escape_html(this.default_text)}"
10351034
/>
10361035
</li>
10371036
</ul>

‎dist/js/chosen.proto.min.js‎

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎docs/chosen.jquery.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,6 @@ This file is generated by `grunt build`, do not edit it by hand.
10311031
role="combobox"
10321032
style="width:25px;"
10331033
type="text"
1034-
value="${this.escape_html(this.default_text)}"
10351034
/>
10361035
</li>
10371036
</ul>

‎docs/chosen.jquery.min.js‎

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎docs/chosen.proto.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,6 @@ This file is generated by `grunt build`, do not edit it by hand.
10311031
role="combobox"
10321032
style="width:25px;"
10331033
type="text"
1034-
value="${this.escape_html(this.default_text)}"
10351034
/>
10361035
</li>
10371036
</ul>

‎docs/chosen.proto.min.js‎

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎spec/jquery/basic.spec.coffee‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,19 @@ describe "Basic setup", ->
184184

185185
describe "data-placeholder", ->
186186

187+
it "should use the placeholder attribute for multiple selects", ->
188+
div = $("<div>").html("
189+
<select data-placeholder='Choose a Country...' multiple>
190+
<option value='United States'>United States</option>
191+
</select>
192+
")
193+
div.find("select").chosen()
194+
search = div.find(".chosen-search-input")
195+
196+
expect(search.attr("placeholder")).toBe("Choose a Country...")
197+
expect(search[0].hasAttribute("value")).toBe(false)
198+
expect(search.val()).toBe("")
199+
187200
it "should render", ->
188201
tmpl = "
189202
<select data-placeholder='Choose a Country...'>

0 commit comments

Comments
 (0)