1
0
mirror of synced 2024-12-01 17:16:02 +03:00

Merge pull request #2610 from torke1/patch-1

Prevent multiple select2-hidden-accessible span's
This commit is contained in:
Kevin Brown 2014-08-21 18:58:17 -04:00
commit 2e5538318e

View File

@ -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 = $('.select2-hidden-accessible');
if (this.liveRegion.length == 0) {
this.liveRegion = $("<span>", { this.liveRegion = $("<span>", {
role: "status", role: "status",
"aria-live": "polite" "aria-live": "polite"
}) })
.addClass("select2-hidden-accessible") .addClass("select2-hidden-accessible")
.appendTo(document.body); .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