Skip to content

Commit

Permalink
All: Drop support for IE & some other browsers (but mostly IE)
Browse files Browse the repository at this point in the history
Closes gh-2249
  • Loading branch information
mgol committed May 14, 2024
1 parent daa6fb5 commit bb49bd7
Show file tree
Hide file tree
Showing 53 changed files with 243 additions and 716 deletions.
6 changes: 0 additions & 6 deletions demos/autocomplete/maxheight.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@
/* prevent horizontal scrollbar */
overflow-x: hidden;
}
/* IE 6 doesn't support max-height
* we use height instead, but this forces the menu to always be this tall
*/
* html .ui-autocomplete {
height: 100px;
}
</style>
<script src="../../external/requirejs/require.js"></script>
<script src="../bootstrap.js">
Expand Down
4 changes: 1 addition & 3 deletions demos/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
( function() {
"use strict";

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

// Read the modules
var modules = script.getAttribute( "data-modules" );
Expand Down
2 changes: 0 additions & 2 deletions demos/tooltip/custom-style.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@
width: 25px;
height: 25px;
box-shadow: 6px 5px 9px -9px black;
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
}
.arrow.top:after {
Expand Down
11 changes: 0 additions & 11 deletions tests/lib/qunit-assert-domequal.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,6 @@ function getElementStyles( elem ) {
key = style[ len ];
camelKey = camelCase( key );

// Support: IE <=11+
// In IE, `option` elements may have different initial `option` colors.
// They may initially all be transparent, but later the selected
// option gets a blue background with white text; ignore it.
if ( document.documentMode && elem.nodeName.toLowerCase() === "option" && (
camelKey === "color" ||
camelKey.indexOf( "Color" ) === camelKey.length - "Color".length
) ) {
continue;
}

if ( typeof style[ key ] === "string" ) {
styles[ camelKey ] = style[ key ];
}
Expand Down
3 changes: 0 additions & 3 deletions tests/lib/vendor/qunit-composite/qunit-composite.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ function addEvent( elem, type, fn ) {
if ( elem.addEventListener ) {
// Standards-based browsers
elem.addEventListener( type, fn, false );
} else if ( elem.attachEvent ) {
// support: IE <9
elem.attachEvent( "on" + type, fn );
}
}

Expand Down
6 changes: 1 addition & 5 deletions tests/unit/autocomplete/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,7 @@ $.each( [
assert.ok( menu.is( ":visible" ), "menu is visible after delay" );
element.simulate( "keydown", { keyCode: $.ui.keyCode.DOWN } );
element.simulate( "keydown", { keyCode: $.ui.keyCode.ENTER } );

// Blur must be async for IE to handle it properly
setTimeout( function() {
element.simulate( "blur" );
} );
element.simulate( "blur" );
} );
} );
} );
Expand Down
5 changes: 2 additions & 3 deletions tests/unit/button/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ define( [
"qunit",
"jquery",
"lib/helper",
"ui/safe-active-element",
"ui/widgets/button"
], function( QUnit, $, helper ) {
"use strict";
Expand All @@ -17,10 +16,10 @@ QUnit.test( "Disabled button loses focus", function( assert ) {
element.trigger( "focus" );
setTimeout( function() {

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

element.button( "disable" );
assert.notEqual( element[ 0 ], $.ui.safeActiveElement( document ), "Button has had focus removed" );
assert.notEqual( element[ 0 ], document.activeElement, "Button has had focus removed" );
ready();
} );
} );
Expand Down
10 changes: 1 addition & 9 deletions tests/unit/checkboxradio/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ QUnit.test( "Radios - Initial class structure", function( assert ) {
} );

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

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

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

QUnit.test( "Handle form association via form attribute", function( assert ) {
Expand Down
7 changes: 1 addition & 6 deletions tests/unit/core/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ define( [
"jquery",
"lib/common",
"lib/helper",
"ui/form",
"ui/labels",
"ui/unique-id"
], function( QUnit, $, common, helper ) {
Expand Down Expand Up @@ -150,10 +149,6 @@ QUnit.test( "Labels", function( assert ) {
function testLabels( testType ) {
var labels = dom.find( "#test" ).labels();
var found = labels.map( function() {

// Support: Core 1.9 Only
// We use String.prototype.trim because core 1.9.x silently fails
// when white space is present
return String.prototype.trim.call( $( this ).text() );
} ).get();

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

// If input has a form the value should reset to "" if not it should be "changed"
var value = form.length ? "" : "changed";
Expand Down
3 changes: 0 additions & 3 deletions tests/unit/datepicker/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,6 @@ QUnit.test( "customStructure", function( assert ) {
} );
}

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

Expand Down
Loading

0 comments on commit bb49bd7

Please sign in to comment.