Skip to content

Commit 15b654a

Browse files
committed
support readonly attribute by disabling select2. fixes select2#293
1 parent b422d4e commit 15b654a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

select2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@
559559
this.monitorSource();
560560
}
561561

562-
if (opts.element.is(":disabled")) this.disable();
562+
if (opts.element.is(":disabled") || opts.element.is("[readonly='readonly']")) this.disable();
563563
},
564564

565565
// abstract

0 commit comments

Comments
 (0)