Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chosen remove item X is not accessible #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion coffee/chosen.jquery.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ class Chosen extends AbstractChosen
if item.disabled
choice.addClass 'search-choice-disabled'
else
close_link = $('<button />', { type: 'button', tabindex: -1, class: 'search-choice-close', 'data-option-array-index': item.data['data-option-array-index'] })
close_link = $('<button />', { type: 'button', tabindex: -1, class: 'search-choice-close', 'data-option-array-index': item.data['data-option-array-index'] }).html('<span class="visually-hidden focusable">' + AbstractChosen.default_remove_item_text + '</span>')
close_link.on 'click.chosen', (evt) => this.choice_destroy_link_click(evt)
choice.append close_link

Expand Down
2 changes: 1 addition & 1 deletion coffee/chosen.proto.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ class @Chosen extends AbstractChosen
if item.disabled
choice.addClassName 'search-choice-disabled'
else
close_link = new Element('button', { type: 'button', tabindex: -1, class: 'search-choice-close', rel: item.data['data-option-array-index'] })
close_link = new Element('button', { type: 'button', tabindex: -1, class: 'search-choice-close', rel: item.data['data-option-array-index'] }).update('<span class="visually-hidden focusable">' + AbstractChosen.default_remove_item_text + '</span>')
close_link.observe "click", (evt) => this.choice_destroy_link_click(evt)
choice.insert close_link
if @inherit_option_classes && item.classes
Expand Down
1 change: 1 addition & 0 deletions coffee/lib/abstract-chosen.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -512,3 +512,4 @@ class AbstractChosen
@default_single_text: "Select an Option"
@default_no_result_text: "No results for:"
@default_create_option_text: "Add Option:"
@default_remove_item_text: "Remove selection"
6 changes: 4 additions & 2 deletions docs/chosen.jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Chosen, a Select Box Enhancer for jQuery and Prototype
Version 2.2.1
Full source at https://github.com/jjj/chosen
Copyright (c) 2011-2022 JJJ
Copyright (c) 2011-2023 JJJ
MIT License, https://github.com/jjj/chosen/blob/master/LICENSE.md
This file is generated by `grunt build`, do not edit it by hand.
*/
Expand Down Expand Up @@ -955,6 +955,8 @@ This file is generated by `grunt build`, do not edit it by hand.

AbstractChosen.default_create_option_text = "Add Option:";

AbstractChosen.default_remove_item_text = "Remove selection";

return AbstractChosen;

}).call(this);
Expand Down Expand Up @@ -1460,7 +1462,7 @@ This file is generated by `grunt build`, do not edit it by hand.
tabindex: -1,
class: 'search-choice-close',
'data-option-array-index': item.data['data-option-array-index']
});
}).html('<span class="visually-hidden focusable">' + AbstractChosen.default_remove_item_text + '</span>');
close_link.on('click.chosen', (evt) => {
return this.choice_destroy_link_click(evt);
});
Expand Down
4 changes: 2 additions & 2 deletions docs/chosen.jquery.min.js

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions docs/chosen.proto.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Chosen, a Select Box Enhancer for jQuery and Prototype
Version 2.2.1
Full source at https://github.com/jjj/chosen
Copyright (c) 2011-2022 JJJ
Copyright (c) 2011-2023 JJJ
MIT License, https://github.com/jjj/chosen/blob/master/LICENSE.md
This file is generated by `grunt build`, do not edit it by hand.
*/
Expand Down Expand Up @@ -955,6 +955,8 @@ This file is generated by `grunt build`, do not edit it by hand.

AbstractChosen.default_create_option_text = "Add Option:";

AbstractChosen.default_remove_item_text = "Remove selection";

return AbstractChosen;

}).call(this);
Expand Down Expand Up @@ -1466,7 +1468,7 @@ This file is generated by `grunt build`, do not edit it by hand.
tabindex: -1,
class: 'search-choice-close',
rel: item.data['data-option-array-index']
});
}).update('<span class="visually-hidden focusable">' + AbstractChosen.default_remove_item_text + '</span>');
close_link.observe("click", (evt) => {
return this.choice_destroy_link_click(evt);
});
Expand Down
4 changes: 2 additions & 2 deletions docs/chosen.proto.min.js

Large diffs are not rendered by default.