File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed
Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,12 @@ define( [
2626 // Make sure textarea (and checkbox) defaultValue is properly cloned
2727 div . innerHTML = "<textarea>x</textarea>" ;
2828 support . noCloneChecked = ! ! div . cloneNode ( true ) . lastChild . defaultValue ;
29+
30+ // Support: IE <=9 only
31+ // IE <=9 replaces <option> tags with their contents when inserted outside of
32+ // the select element.
33+ div . innerHTML = "<option></option>" ;
34+ support . option = ! ! div . lastChild ;
2935} ) ( ) ;
3036
3137return support ;
Original file line number Diff line number Diff line change 1- define ( function ( ) {
1+ define ( [
2+ "./support"
3+ ] , function ( support ) {
24
35// We have to close these tags to support XHTML (#13200)
46var wrapMap = {
57
6- // Support: IE9
7- option : [ 1 , "<select multiple='multiple'>" , "</select>" ] ,
88
99 // XHTML parsers do not magically insert elements in the
1010 // same way that tag soup parsers do. So we cannot shorten
@@ -17,11 +17,14 @@ var wrapMap = {
1717 _default : [ 0 , "" , "" ]
1818} ;
1919
20- // Support: IE9
21- wrapMap . optgroup = wrapMap . option ;
2220
2321wrapMap . tbody = wrapMap . tfoot = wrapMap . colgroup = wrapMap . caption = wrapMap . thead ;
2422wrapMap . th = wrapMap . td ;
2523
24+ // Support: IE <=9 only
25+ if ( ! support . option ) {
26+ wrapMap . optgroup = wrapMap . option = [ 1 , "<select multiple='multiple'>" , "</select>" ] ;
27+ }
28+
2629return wrapMap ;
2730} ) ;
You can’t perform that action at this time.
0 commit comments