fix multiselects in IEs. fixes #241
This commit is contained in:
parent
1771c3ba61
commit
a718dc45a0
15
select2.js
15
select2.js
@ -1736,20 +1736,17 @@
|
|||||||
|
|
||||||
// multi
|
// multi
|
||||||
addSelectedChoice: function (data) {
|
addSelectedChoice: function (data) {
|
||||||
var choice=$("<li class='select2-search-choice'></li>"),
|
var choice=$(
|
||||||
|
"<li class='select2-search-choice'>" +
|
||||||
|
" <div></div>" +
|
||||||
|
" <a href='javascript:void(0)' class='select2-search-choice-close' tabindex='-1'></a>" +
|
||||||
|
"</li>"),
|
||||||
id = this.id(data),
|
id = this.id(data),
|
||||||
val = this.getVal(),
|
val = this.getVal(),
|
||||||
formatted;
|
formatted;
|
||||||
|
|
||||||
choice.find('.select2-tmp').replaceWith(this.opts.formatSelection(data));
|
|
||||||
|
|
||||||
formatted=this.opts.formatSelection(data, choice);
|
formatted=this.opts.formatSelection(data, choice);
|
||||||
if (formatted !== undefined) {
|
choice.find("div").replaceWith("<div>"+formatted+"</div>");
|
||||||
choice.append(formatted);
|
|
||||||
}
|
|
||||||
|
|
||||||
choice.append("<a href='javascript:void(0)' class='select2-search-choice-close' tabindex='-1'></a>");
|
|
||||||
|
|
||||||
choice.find(".select2-search-choice-close")
|
choice.find(".select2-search-choice-close")
|
||||||
.bind("click dblclick", this.bind(function (e) {
|
.bind("click dblclick", this.bind(function (e) {
|
||||||
if (!this.enabled) return;
|
if (!this.enabled) return;
|
||||||
|
Loading…
Reference in New Issue
Block a user