Merge pull request #2610 from torke1/patch-1
Prevent multiple select2-hidden-accessible span's
This commit is contained in:
commit
2e5538318e
15
select2.js
15
select2.js
@ -699,12 +699,15 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||||||
|
|
||||||
this.container = this.createContainer();
|
this.container = this.createContainer();
|
||||||
|
|
||||||
this.liveRegion = $("<span>", {
|
this.liveRegion = $('.select2-hidden-accessible');
|
||||||
role: "status",
|
if (this.liveRegion.length == 0) {
|
||||||
"aria-live": "polite"
|
this.liveRegion = $("<span>", {
|
||||||
})
|
role: "status",
|
||||||
.addClass("select2-hidden-accessible")
|
"aria-live": "polite"
|
||||||
.appendTo(document.body);
|
})
|
||||||
|
.addClass("select2-hidden-accessible")
|
||||||
|
.appendTo(document.body);
|
||||||
|
}
|
||||||
|
|
||||||
this.containerId="s2id_"+(opts.element.attr("id") || "autogen"+nextUid());
|
this.containerId="s2id_"+(opts.element.attr("id") || "autogen"+nextUid());
|
||||||
this.containerEventName= this.containerId
|
this.containerEventName= this.containerId
|
||||||
|
Loading…
Reference in New Issue
Block a user