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( [
26
26
// Make sure textarea (and checkbox) defaultValue is properly cloned
27
27
div . innerHTML = "<textarea>x</textarea>" ;
28
28
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 ;
29
35
} ) ( ) ;
30
36
31
37
return support ;
Original file line number Diff line number Diff line change 1
- define ( function ( ) {
1
+ define ( [
2
+ "./support"
3
+ ] , function ( support ) {
2
4
3
5
// We have to close these tags to support XHTML (#13200)
4
6
var wrapMap = {
5
7
6
- // Support: IE9
7
- option : [ 1 , "<select multiple='multiple'>" , "</select>" ] ,
8
8
9
9
// XHTML parsers do not magically insert elements in the
10
10
// same way that tag soup parsers do. So we cannot shorten
@@ -17,11 +17,14 @@ var wrapMap = {
17
17
_default : [ 0 , "" , "" ]
18
18
} ;
19
19
20
- // Support: IE9
21
- wrapMap . optgroup = wrapMap . option ;
22
20
23
21
wrapMap . tbody = wrapMap . tfoot = wrapMap . colgroup = wrapMap . caption = wrapMap . thead ;
24
22
wrapMap . th = wrapMap . td ;
25
23
24
+ // Support: IE <=9 only
25
+ if ( ! support . option ) {
26
+ wrapMap . optgroup = wrapMap . option = [ 1 , "<select multiple='multiple'>" , "</select>" ] ;
27
+ }
28
+
26
29
return wrapMap ;
27
30
} ) ;
You can’t perform that action at this time.
0 commit comments