Skip to content

Commit bb49bd7

Browse files
committed
All: Drop support for IE & some other browsers (but mostly IE)
Closes gh-2249
1 parent daa6fb5 commit bb49bd7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+243
-716
lines changed

Diff for: demos/autocomplete/maxheight.html

-6
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@
1313
/* prevent horizontal scrollbar */
1414
overflow-x: hidden;
1515
}
16-
/* IE 6 doesn't support max-height
17-
* we use height instead, but this forces the menu to always be this tall
18-
*/
19-
* html .ui-autocomplete {
20-
height: 100px;
21-
}
2216
</style>
2317
<script src="../../external/requirejs/require.js"></script>
2418
<script src="../bootstrap.js">

Diff for: demos/bootstrap.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
( function() {
33
"use strict";
44

5-
// Find the script element
6-
var scripts = document.getElementsByTagName( "script" );
7-
var script = scripts[ scripts.length - 1 ];
5+
var script = document.currentScript;
86

97
// Read the modules
108
var modules = script.getAttribute( "data-modules" );

Diff for: demos/tooltip/custom-style.html

-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@
6060
width: 25px;
6161
height: 25px;
6262
box-shadow: 6px 5px 9px -9px black;
63-
-webkit-transform: rotate(45deg);
64-
-ms-transform: rotate(45deg);
6563
transform: rotate(45deg);
6664
}
6765
.arrow.top:after {

Diff for: tests/lib/qunit-assert-domequal.js

-11
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,6 @@ function getElementStyles( elem ) {
8383
key = style[ len ];
8484
camelKey = camelCase( key );
8585

86-
// Support: IE <=11+
87-
// In IE, `option` elements may have different initial `option` colors.
88-
// They may initially all be transparent, but later the selected
89-
// option gets a blue background with white text; ignore it.
90-
if ( document.documentMode && elem.nodeName.toLowerCase() === "option" && (
91-
camelKey === "color" ||
92-
camelKey.indexOf( "Color" ) === camelKey.length - "Color".length
93-
) ) {
94-
continue;
95-
}
96-
9786
if ( typeof style[ key ] === "string" ) {
9887
styles[ camelKey ] = style[ key ];
9988
}

Diff for: tests/lib/vendor/qunit-composite/qunit-composite.js

-3
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ function addEvent( elem, type, fn ) {
3535
if ( elem.addEventListener ) {
3636
// Standards-based browsers
3737
elem.addEventListener( type, fn, false );
38-
} else if ( elem.attachEvent ) {
39-
// support: IE <9
40-
elem.attachEvent( "on" + type, fn );
4138
}
4239
}
4340

Diff for: tests/unit/autocomplete/events.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,7 @@ $.each( [
7575
assert.ok( menu.is( ":visible" ), "menu is visible after delay" );
7676
element.simulate( "keydown", { keyCode: $.ui.keyCode.DOWN } );
7777
element.simulate( "keydown", { keyCode: $.ui.keyCode.ENTER } );
78-
79-
// Blur must be async for IE to handle it properly
80-
setTimeout( function() {
81-
element.simulate( "blur" );
82-
} );
78+
element.simulate( "blur" );
8379
} );
8480
} );
8581
} );

Diff for: tests/unit/button/core.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ define( [
22
"qunit",
33
"jquery",
44
"lib/helper",
5-
"ui/safe-active-element",
65
"ui/widgets/button"
76
], function( QUnit, $, helper ) {
87
"use strict";
@@ -17,10 +16,10 @@ QUnit.test( "Disabled button loses focus", function( assert ) {
1716
element.trigger( "focus" );
1817
setTimeout( function() {
1918

20-
assert.equal( element[ 0 ], $.ui.safeActiveElement( document ), "Button is focused" );
19+
assert.equal( element[ 0 ], document.activeElement, "Button is focused" );
2120

2221
element.button( "disable" );
23-
assert.notEqual( element[ 0 ], $.ui.safeActiveElement( document ), "Button has had focus removed" );
22+
assert.notEqual( element[ 0 ], document.activeElement, "Button has had focus removed" );
2423
ready();
2524
} );
2625
} );

Diff for: tests/unit/checkboxradio/core.js

+1-9
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ QUnit.test( "Radios - Initial class structure", function( assert ) {
3333
} );
3434

3535
QUnit.test( "Ensure checked after single click on checkbox label button", function( assert ) {
36-
var ready = assert.async();
3736
assert.expect( 2 );
3837

3938
$( "#check2" ).checkboxradio().on( "change", function() {
@@ -43,14 +42,7 @@ QUnit.test( "Ensure checked after single click on checkbox label button", functi
4342
assert.hasClasses( label, "ui-state-active" );
4443
} );
4544

46-
// Support: Opera
47-
// Opera doesn't trigger a change event when this is done synchronously.
48-
// This seems to be a side effect of another test, but until that can be
49-
// tracked down, this delay will have to do.
50-
setTimeout( function() {
51-
$( "#check2" ).checkboxradio( "widget" ).simulate( "click" );
52-
ready();
53-
} );
45+
$( "#check2" ).checkboxradio( "widget" ).simulate( "click" );
5446
} );
5547

5648
QUnit.test( "Handle form association via form attribute", function( assert ) {

Diff for: tests/unit/core/core.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ define( [
33
"jquery",
44
"lib/common",
55
"lib/helper",
6-
"ui/form",
76
"ui/labels",
87
"ui/unique-id"
98
], function( QUnit, $, common, helper ) {
@@ -150,10 +149,6 @@ QUnit.test( "Labels", function( assert ) {
150149
function testLabels( testType ) {
151150
var labels = dom.find( "#test" ).labels();
152151
var found = labels.map( function() {
153-
154-
// Support: Core 1.9 Only
155-
// We use String.prototype.trim because core 1.9.x silently fails
156-
// when white space is present
157152
return String.prototype.trim.call( $( this ).text() );
158153
} ).get();
159154

@@ -183,7 +178,7 @@ QUnit.test( "Labels", function( assert ) {
183178
QUnit.test( name + this.id.replace( /_/g, " " ), function( assert ) {
184179
var ready = assert.async();
185180
assert.expect( 1 );
186-
var form = input._form();
181+
var form = $( input.prop( "form" ) );
187182

188183
// If input has a form the value should reset to "" if not it should be "changed"
189184
var value = form.length ? "" : "changed";

Diff for: tests/unit/datepicker/core.js

-3
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,6 @@ QUnit.test( "customStructure", function( assert ) {
311311
} );
312312
}
313313

314-
// TODO: figure out why this setTimeout is needed in IE,
315-
// it only is necessary when the previous baseStructure tests runs first
316-
// Support: IE
317314
setTimeout( step1 );
318315
} );
319316

0 commit comments

Comments
 (0)