Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion coffee/lib/abstract-chosen.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,6 @@ class AbstractChosen
role="combobox"
style="width:25px;"
type="text"
value="#{this.escape_html(@default_text)}"
/>
</li>
</ul>
Expand Down
1 change: 0 additions & 1 deletion dist/js/chosen.jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,6 @@ This file is generated by `grunt build`, do not edit it by hand.
role="combobox"
style="width:25px;"
type="text"
value="${this.escape_html(this.default_text)}"
/>
</li>
</ul>
Expand Down
3 changes: 1 addition & 2 deletions dist/js/chosen.jquery.min.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion dist/js/chosen.proto.js
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,6 @@ This file is generated by `grunt build`, do not edit it by hand.
role="combobox"
style="width:25px;"
type="text"
value="${this.escape_html(this.default_text)}"
/>
</li>
</ul>
Expand Down
1 change: 0 additions & 1 deletion dist/js/chosen.proto.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion docs/chosen.jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,6 @@ This file is generated by `grunt build`, do not edit it by hand.
role="combobox"
style="width:25px;"
type="text"
value="${this.escape_html(this.default_text)}"
/>
</li>
</ul>
Expand Down
3 changes: 1 addition & 2 deletions docs/chosen.jquery.min.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/chosen.proto.js
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,6 @@ This file is generated by `grunt build`, do not edit it by hand.
role="combobox"
style="width:25px;"
type="text"
value="${this.escape_html(this.default_text)}"
/>
</li>
</ul>
Expand Down
1 change: 0 additions & 1 deletion docs/chosen.proto.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions spec/jquery/basic.spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,19 @@ describe "Basic setup", ->

describe "data-placeholder", ->

it "should use the placeholder attribute for multiple selects", ->
div = $("<div>").html("
<select data-placeholder='Choose a Country...' multiple>
<option value='United States'>United States</option>
</select>
")
div.find("select").chosen()
search = div.find(".chosen-search-input")

expect(search.attr("placeholder")).toBe("Choose a Country...")
expect(search[0].hasAttribute("value")).toBe(false)
expect(search.val()).toBe("")

it "should render", ->
tmpl = "
<select data-placeholder='Choose a Country...'>
Expand Down
16 changes: 16 additions & 0 deletions spec/proto/basic.spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,22 @@ describe "Basic setup", ->

describe "data-placeholder", ->

it "should use the placeholder attribute for multiple selects", ->
div = new Element("div")
div.update("
<select data-placeholder='Choose a Country...' multiple>
<option value='United States'>United States</option>
</select>
")
document.body.appendChild(div)
new Chosen(div.down("select"))
search = div.down(".chosen-search-input")

expect(search.readAttribute("placeholder")).toBe("Choose a Country...")
expect(search.hasAttribute("value")).toBe(false)
expect(search.value).toBe("")
div.remove()

it "should render", ->
tmpl = "
<select data-placeholder='Choose a Country...'>
Expand Down
25 changes: 25 additions & 0 deletions triage/upstream-issues.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,30 @@
"number": 2999,
"status": "covered-in-fork",
"note": "Current label handling uses an element reference and never calls form_field_label as a function."
},
{
"number": 3133,
"status": "fixed-in-fork",
"note": "Multiple search inputs now expose placeholder text only through the standard placeholder attribute."
},
{
"number": 2891,
"status": "covered-in-fork",
"note": "The fork README lists the distributed jQuery, Prototype, and CSS files and includes npm and Composer installation commands."
},
{
"number": 3116,
"status": "covered-in-fork",
"note": "Appending options and firing chosen:updated is covered in both adapters, including preserving an active search."
},
{
"number": 3154,
"status": "covered-in-fork",
"note": "The maintained fork publishes current releases as chosen-jjj; it cannot backfill releases under Harvest's npm package."
},
{
"number": 3149,
"status": "blocked",
"note": "The report does not include option markup, an expected value, or a reproduction that distinguishes an HTML entity from option text."
}
]
Loading