All: Drop support for IE & some other browsers (but mostly IE)

Closes gh-2249
This commit is contained in:
Michał Gołębiowski-Owczarek 2024-05-01 00:54:19 +02:00
parent daa6fb55b3
commit bb49bd794b
No known key found for this signature in database
53 changed files with 233 additions and 706 deletions

View File

@ -13,12 +13,6 @@
/* prevent horizontal scrollbar */ /* prevent horizontal scrollbar */
overflow-x: hidden; 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> </style>
<script src="../../external/requirejs/require.js"></script> <script src="../../external/requirejs/require.js"></script>
<script src="../bootstrap.js"> <script src="../bootstrap.js">

4
demos/bootstrap.js vendored
View File

@ -2,9 +2,7 @@
( function() { ( function() {
"use strict"; "use strict";
// Find the script element var script = document.currentScript;
var scripts = document.getElementsByTagName( "script" );
var script = scripts[ scripts.length - 1 ];
// Read the modules // Read the modules
var modules = script.getAttribute( "data-modules" ); var modules = script.getAttribute( "data-modules" );

View File

@ -60,8 +60,6 @@
width: 25px; width: 25px;
height: 25px; height: 25px;
box-shadow: 6px 5px 9px -9px black; box-shadow: 6px 5px 9px -9px black;
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg); transform: rotate(45deg);
} }
.arrow.top:after { .arrow.top:after {

View File

@ -83,17 +83,6 @@ function getElementStyles( elem ) {
key = style[ len ]; key = style[ len ];
camelKey = camelCase( key ); 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" ) { if ( typeof style[ key ] === "string" ) {
styles[ camelKey ] = style[ key ]; styles[ camelKey ] = style[ key ];
} }

View File

@ -35,9 +35,6 @@ function addEvent( elem, type, fn ) {
if ( elem.addEventListener ) { if ( elem.addEventListener ) {
// Standards-based browsers // Standards-based browsers
elem.addEventListener( type, fn, false ); elem.addEventListener( type, fn, false );
} else if ( elem.attachEvent ) {
// support: IE <9
elem.attachEvent( "on" + type, fn );
} }
} }

View File

@ -75,14 +75,10 @@ $.each( [
assert.ok( menu.is( ":visible" ), "menu is visible after delay" ); assert.ok( menu.is( ":visible" ), "menu is visible after delay" );
element.simulate( "keydown", { keyCode: $.ui.keyCode.DOWN } ); element.simulate( "keydown", { keyCode: $.ui.keyCode.DOWN } );
element.simulate( "keydown", { keyCode: $.ui.keyCode.ENTER } ); 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" );
} ); } );
} ); } );
} ); } );
} );
QUnit.test( "change without selection", function( assert ) { QUnit.test( "change without selection", function( assert ) {
var ready = assert.async(); var ready = assert.async();

View File

@ -2,7 +2,6 @@ define( [
"qunit", "qunit",
"jquery", "jquery",
"lib/helper", "lib/helper",
"ui/safe-active-element",
"ui/widgets/button" "ui/widgets/button"
], function( QUnit, $, helper ) { ], function( QUnit, $, helper ) {
"use strict"; "use strict";
@ -17,10 +16,10 @@ QUnit.test( "Disabled button loses focus", function( assert ) {
element.trigger( "focus" ); element.trigger( "focus" );
setTimeout( function() { setTimeout( function() {
assert.equal( element[ 0 ], $.ui.safeActiveElement( document ), "Button is focused" ); assert.equal( element[ 0 ], document.activeElement, "Button is focused" );
element.button( "disable" ); 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(); ready();
} ); } );
} ); } );

View File

@ -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 ) { QUnit.test( "Ensure checked after single click on checkbox label button", function( assert ) {
var ready = assert.async();
assert.expect( 2 ); assert.expect( 2 );
$( "#check2" ).checkboxradio().on( "change", function() { $( "#check2" ).checkboxradio().on( "change", function() {
@ -43,14 +42,7 @@ QUnit.test( "Ensure checked after single click on checkbox label button", functi
assert.hasClasses( label, "ui-state-active" ); 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" ); $( "#check2" ).checkboxradio( "widget" ).simulate( "click" );
ready();
} );
} ); } );
QUnit.test( "Handle form association via form attribute", function( assert ) { QUnit.test( "Handle form association via form attribute", function( assert ) {

View File

@ -3,7 +3,6 @@ define( [
"jquery", "jquery",
"lib/common", "lib/common",
"lib/helper", "lib/helper",
"ui/form",
"ui/labels", "ui/labels",
"ui/unique-id" "ui/unique-id"
], function( QUnit, $, common, helper ) { ], function( QUnit, $, common, helper ) {
@ -150,10 +149,6 @@ QUnit.test( "Labels", function( assert ) {
function testLabels( testType ) { function testLabels( testType ) {
var labels = dom.find( "#test" ).labels(); var labels = dom.find( "#test" ).labels();
var found = labels.map( function() { 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() ); return String.prototype.trim.call( $( this ).text() );
} ).get(); } ).get();
@ -183,7 +178,7 @@ QUnit.test( "Labels", function( assert ) {
QUnit.test( name + this.id.replace( /_/g, " " ), function( assert ) { QUnit.test( name + this.id.replace( /_/g, " " ), function( assert ) {
var ready = assert.async(); var ready = assert.async();
assert.expect( 1 ); 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" // If input has a form the value should reset to "" if not it should be "changed"
var value = form.length ? "" : "changed"; var value = form.length ? "" : "changed";

View File

@ -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 ); setTimeout( step1 );
} ); } );

View File

@ -5,8 +5,7 @@ define( [
"ui/widgets/datepicker", "ui/widgets/datepicker",
"ui/i18n/datepicker-fr", "ui/i18n/datepicker-fr",
"ui/i18n/datepicker-he", "ui/i18n/datepicker-he",
"ui/i18n/datepicker-zh-CN", "ui/i18n/datepicker-zh-CN"
"ui/ie"
], function( QUnit, $, testHelper ) { ], function( QUnit, $, testHelper ) {
"use strict"; "use strict";
@ -97,22 +96,12 @@ QUnit.test( "change", function( assert ) {
assert.equal( $.datepicker._defaults.showOn, "focus", "Retain default showOn" ); assert.equal( $.datepicker._defaults.showOn, "focus", "Retain default showOn" );
} ); } );
( function() {
var url = window.location.search;
url = decodeURIComponent( url.slice( url.indexOf( "swarmURL=" ) + 9 ) );
// TODO: This test occassionally fails in IE in TestSwarm
if ( $.ui.ie && url && url.indexOf( "http" ) === 0 ) {
return;
}
QUnit.test( "invocation", function( assert ) { QUnit.test( "invocation", function( assert ) {
var ready = assert.async(); var ready = assert.async();
var button, image, var button, image,
isOldIE = $.ui.ie && ( !document.documentMode || document.documentMode < 9 ),
body = $( "body" ); body = $( "body" );
assert.expect( isOldIE ? 25 : 29 ); assert.expect( 29 );
function step0() { function step0() {
var inp = testHelper.initNewInput(), var inp = testHelper.initNewInput(),
@ -216,8 +205,6 @@ QUnit.test( "change", function( assert ) {
image = button.children( "img" ); image = button.children( "img" );
assert.ok( image.length === 1, "Both - button image present" ); assert.ok( image.length === 1, "Both - button image present" );
// TODO: This test occasionally fails to focus in IE8 in BrowserStack
if ( !isOldIE ) {
testHelper.onFocus( inp, function() { testHelper.onFocus( inp, function() {
assert.ok( dp.is( ":visible" ), "Both - rendered on focus" ); assert.ok( dp.is( ":visible" ), "Both - rendered on focus" );
body.simulate( "mousedown", {} ); body.simulate( "mousedown", {} );
@ -230,14 +217,10 @@ QUnit.test( "change", function( assert ) {
ready(); ready();
} ); } );
} else {
ready();
}
} }
step0(); step0();
} ); } );
} )();
QUnit.test( "otherMonths", function( assert ) { QUnit.test( "otherMonths", function( assert ) {
assert.expect( 8 ); assert.expect( 8 );

View File

@ -103,12 +103,6 @@ QUnit.test( "focus tabbable", function( assert ) {
}; };
function checkFocus( markup, options, testFn, next ) { function checkFocus( markup, options, testFn, next ) {
// Support: IE8
// For some reason the focus doesn't get set properly if we don't
// focus the body first.
$( "body" ).trigger( "focus" );
element = $( markup ).dialog( options ); element = $( markup ).dialog( options );
setTimeout( function() { setTimeout( function() {
testFn( function done() { testFn( function done() {
@ -122,31 +116,12 @@ QUnit.test( "focus tabbable", function( assert ) {
checkFocus( "<div><input><input></div>", options, function( done ) { checkFocus( "<div><input><input></div>", options, function( done ) {
var input = element.find( "input" ).last().trigger( "focus" ).trigger( "blur" ); var input = element.find( "input" ).last().trigger( "focus" ).trigger( "blur" );
// Support: IE 11+
// In IE in jQuery 3.4+ a sequence:
// $( inputNode ).trigger( "focus" ).trigger( "blur" ).trigger( "focus" )
// doesn't end up with a focused input. See:
// https://github.com/jquery/jquery/issues/4856
// However, in this test we only want to check that the last focused
// input receives the focus back when `_focusTabbable()` is called
// which in reality doesn't happen so quickly so let's avoid the issue
// by waiting a bit.
if ( document.documentMode ) {
setTimeout( function() {
focusTabbableAndAssert();
}, 500 );
} else {
focusTabbableAndAssert();
}
function focusTabbableAndAssert() {
element.dialog( "instance" )._focusTabbable(); element.dialog( "instance" )._focusTabbable();
setTimeout( function() { setTimeout( function() {
assert.equal( document.activeElement, input[ 0 ], assert.equal( document.activeElement, input[ 0 ],
"1. an element that was focused previously." ); "1. an element that was focused previously." );
done(); done();
} ); } );
}
}, step2 ); }, step2 );
} }
@ -303,11 +278,6 @@ QUnit.test( "interaction between overlay and other dialogs", function( assert )
second = $( "<div><input id='input-2'></div>" ).testWidget(), second = $( "<div><input id='input-2'></div>" ).testWidget(),
secondInput = second.find( "input" ); secondInput = second.find( "input" );
// Support: IE8
// For some reason the focus doesn't get set properly if we don't
// focus the body first.
$( "body" ).trigger( "focus" );
// Wait for the modal to init // Wait for the modal to init
setTimeout( function() { setTimeout( function() {

View File

@ -226,11 +226,6 @@ QUnit.test( "#8958: dialog can be opened while opening", function( assert ) {
} }
} ); } );
// Support: IE8
// For some reason the #favorite-animal input doesn't get focus if we don't
// focus the body first, causing the test to hang.
$( "body" ).trigger( "focus" );
$( "#favorite-animal" ) $( "#favorite-animal" )
// We focus the input to start the test. Once it receives focus, the // We focus the input to start the test. Once it receives focus, the

View File

@ -38,8 +38,8 @@ QUnit.test( "element types", function( assert ) {
} ); } );
offsetAfter = el.offset(); offsetAfter = el.offset();
// Support: FF, Chrome, and IE9, // Support: Firefox, Chrome
// there are some rounding errors in so we can't say equal, we have to settle for close enough // There are some rounding errors, so we can't say equal, we have to settle for close enough
assert.close( offsetBefore.left, offsetAfter.left - 50, 1, "dragged[50, 50] " + "<" + typeName + "> left" ); assert.close( offsetBefore.left, offsetAfter.left - 50, 1, "dragged[50, 50] " + "<" + typeName + "> left" );
assert.close( offsetBefore.top, offsetAfter.top - 50, 1, "dragged[50, 50] " + "<" + typeName + "> top" ); assert.close( offsetBefore.top, offsetAfter.top - 50, 1, "dragged[50, 50] " + "<" + typeName + "> top" );
el.draggable( "destroy" ); el.draggable( "destroy" );
@ -112,7 +112,6 @@ QUnit.test( "Stray mousemove after mousedown still drags", function( assert ) {
// In IE8, when content is placed under the mouse (e.g. when draggable content is replaced // In IE8, when content is placed under the mouse (e.g. when draggable content is replaced
// on mousedown), mousemove is triggered on those elements even though the mouse hasn't moved. // on mousedown), mousemove is triggered on those elements even though the mouse hasn't moved.
// Support: IE <9
element.on( "mousedown", function() { element.on( "mousedown", function() {
$( document ).simulate( "mousemove", { button: -1 } ); $( document ).simulate( "mousemove", { button: -1 } );
} ); } );
@ -341,11 +340,13 @@ QUnit.test( "blur behavior - off handle", function( assert ) {
var element = $( "#draggable2" ).draggable( { handle: "span" } ), var element = $( "#draggable2" ).draggable( { handle: "span" } ),
focusElement = $( "<div tabindex='1'></div>" ).appendTo( element ); focusElement = $( "<div tabindex='1'></div>" ).appendTo( element );
// Mock $.ui.safeBlur with a spy // Mock $.ui.trigger with a spy
var _safeBlur = $.ui.safeBlur; var _trigger = $.fn.trigger;
var blurCalledCount = 0; var blurCalledCount = 0;
$.ui.safeBlur = function() { $.fn.trigger = function( eventName ) {
if ( eventName === "blur" ) {
blurCalledCount++; blurCalledCount++;
}
}; };
testHelper.onFocus( focusElement, function() { testHelper.onFocus( focusElement, function() {
@ -357,8 +358,8 @@ QUnit.test( "blur behavior - off handle", function( assert ) {
testHelper.move( element.find( "span" ), 1, 1 ); testHelper.move( element.find( "span" ), 1, 1 );
assert.strictEqual( blurCalledCount, 1, "draggable blurs when mousing down on handle" ); assert.strictEqual( blurCalledCount, 1, "draggable blurs when mousing down on handle" );
// Restore safeBlur // Restore trigger
$.ui.safeBlur = _safeBlur; $.fn.trigger = _trigger;
ready(); ready();
} ); } );
@ -394,12 +395,7 @@ QUnit.test( "ui-draggable-handle managed correctly in nested draggables", functi
assert.hasClasses( child, "ui-draggable-handle", "child retains class name on destroy" ); assert.hasClasses( child, "ui-draggable-handle", "child retains class name on destroy" );
} ); } );
// Support: IE 8 only QUnit.test( "does not stop propagation to window", function( assert ) {
// IE 8 implements DOM Level 2 Events which only has events bubble up to the document.
// We skip this test since it would be impossible for it to pass in such an environment.
QUnit[ document.documentMode === 8 ? "skip" : "test" ](
"does not stop propagation to window",
function( assert ) {
assert.expect( 1 ); assert.expect( 1 );
var element = $( "#draggable1" ).draggable(); var element = $( "#draggable1" ).draggable();
@ -414,7 +410,6 @@ QUnit[ document.documentMode === 8 ? "skip" : "test" ](
} ); } );
$( window ).off( "mouseup", handler ); $( window ).off( "mouseup", handler );
} } );
);
} ); } );

View File

@ -8,9 +8,6 @@ define( [
return $.extend( helper, { return $.extend( helper, {
// TODO: remove the unreliable offset hacks
unreliableOffset: $.ui.ie && ( !document.documentMode || document.documentMode < 8 ) ? 2 : 0,
testDragPosition: function( assert, el, dx, dy, expectedDX, expectedDY, msg ) { testDragPosition: function( assert, el, dx, dy, expectedDX, expectedDY, msg ) {
msg = msg ? msg + "." : ""; msg = msg ? msg + "." : "";

View File

@ -743,11 +743,11 @@ QUnit.test( "cursorAt", function( assert ) {
assert.equal( ui.position.left - ui.originalPosition.left, deltaX, testName + " " + position + " left" ); assert.equal( ui.position.left - ui.originalPosition.left, deltaX, testName + " " + position + " left" );
assert.equal( ui.position.top - ui.originalPosition.top, deltaY, testName + " " + position + " top" ); assert.equal( ui.position.top - ui.originalPosition.top, deltaY, testName + " " + position + " top" );
} else if ( testData.cursorAt.right ) { } else if ( testData.cursorAt.right ) {
assert.equal( ui.helper.width() - ( event.clientX - ui.offset.left ), testData.x - testHelper.unreliableOffset, testName + " " + position + " left" ); assert.equal( ui.helper.width() - ( event.clientX - ui.offset.left ), testData.x, testName + " " + position + " left" );
assert.equal( ui.helper.height() - ( event.clientY - ui.offset.top ), testData.y - testHelper.unreliableOffset, testName + " " + position + " top" ); assert.equal( ui.helper.height() - ( event.clientY - ui.offset.top ), testData.y, testName + " " + position + " top" );
} else { } else {
assert.equal( event.clientX - ui.offset.left, testData.x + testHelper.unreliableOffset, testName + " " + position + " left" ); assert.equal( event.clientX - ui.offset.left, testData.x, testName + " " + position + " left" );
assert.equal( event.clientY - ui.offset.top, testData.y + testHelper.unreliableOffset, testName + " " + position + " top" ); assert.equal( event.clientY - ui.offset.top, testData.y, testName + " " + position + " top" );
} }
} }
} ); } );
@ -785,11 +785,11 @@ QUnit.test( "cursorAt, switching after initialization", function( assert ) {
assert.equal( ui.position.left - ui.originalPosition.left, deltaX, testName + " " + position + " left" ); assert.equal( ui.position.left - ui.originalPosition.left, deltaX, testName + " " + position + " left" );
assert.equal( ui.position.top - ui.originalPosition.top, deltaY, testName + " " + position + " top" ); assert.equal( ui.position.top - ui.originalPosition.top, deltaY, testName + " " + position + " top" );
} else if ( testData.cursorAt.right ) { } else if ( testData.cursorAt.right ) {
assert.equal( ui.helper.width() - ( event.clientX - ui.offset.left ), testData.x - testHelper.unreliableOffset, testName + " " + position + " left" ); assert.equal( ui.helper.width() - ( event.clientX - ui.offset.left ), testData.x, testName + " " + position + " left" );
assert.equal( ui.helper.height() - ( event.clientY - ui.offset.top ), testData.y - testHelper.unreliableOffset, testName + " " + position + " top" ); assert.equal( ui.helper.height() - ( event.clientY - ui.offset.top ), testData.y, testName + " " + position + " top" );
} else { } else {
assert.equal( event.clientX - ui.offset.left, testData.x + testHelper.unreliableOffset, testName + " " + position + " left" ); assert.equal( event.clientX - ui.offset.left, testData.x, testName + " " + position + " left" );
assert.equal( event.clientY - ui.offset.top, testData.y + testHelper.unreliableOffset, testName + " " + position + " top" ); assert.equal( event.clientY - ui.offset.top, testData.y, testName + " " + position + " top" );
} }
} }
} ); } );
@ -1136,15 +1136,6 @@ QUnit.test( "scroll ignores containers that are overflow: hidden", function( ass
dy: 1300 dy: 1300
} ); } );
// IE8 natively scrolls when dragging an element inside a overflow:hidden
// container, so skip this test if native scroll occurs.
// Support: IE <9
if ( scrollParent.scrollTop() > 0 ) {
assert.ok( true, "overflow:hidden container natively scrolls" );
assert.ok( true, "overflow:hidden container natively scrolls" );
return;
}
element.css( { top: 0, left: 0 } ).draggable( "option", "scroll", true ); element.css( { top: 0, left: 0 } ).draggable( "option", "scroll", true );
element.simulate( "drag", { element.simulate( "drag", {
@ -1458,7 +1449,7 @@ QUnit.test( "zIndex, default, switching after initialization", function( assert
} ); } );
QUnit.test( "iframeFix", function( assert ) { QUnit.test( "iframeFix", function( assert ) {
assert.expect( 6 ); assert.expect( 5 );
var element = $( "<div>" ).appendTo( "#qunit-fixture" ).draggable( { iframeFix: true } ), var element = $( "<div>" ).appendTo( "#qunit-fixture" ).draggable( { iframeFix: true } ),
element2 = $( "<div>" ).appendTo( "#qunit-fixture" ).draggable( { iframeFix: ".iframe" } ), element2 = $( "<div>" ).appendTo( "#qunit-fixture" ).draggable( { iframeFix: ".iframe" } ),
@ -1474,8 +1465,7 @@ QUnit.test( "iframeFix", function( assert ) {
} ); } );
element.one( "drag", function() { element.one( "drag", function() {
var divOffset, iframeOffset, var div = $( this ).children().not( "iframe" );
div = $( this ).children().not( "iframe" );
// https://bugs.jqueryui.com/ticket/9671 // https://bugs.jqueryui.com/ticket/9671
// iframeFix doesn't handle iframes that move // iframeFix doesn't handle iframes that move
@ -1483,13 +1473,7 @@ QUnit.test( "iframeFix", function( assert ) {
assert.equal( div.outerWidth(), iframe.outerWidth(), "blocking div is wide enough" ); assert.equal( div.outerWidth(), iframe.outerWidth(), "blocking div is wide enough" );
assert.equal( div.outerHeight(), iframe.outerHeight(), "blocking div is tall enough" ); assert.equal( div.outerHeight(), iframe.outerHeight(), "blocking div is tall enough" );
divOffset = div.offset(); assert.deepEqual( div.offset(), iframe.offset(), "blocking div is tall enough" );
iframeOffset = iframe.offset();
// Support: Edge <79 only
// In Edge Legacy these values differ a little.
assert.ok( Math.abs( divOffset.top - iframeOffset.top ) < 0.25, "Check top within 0.25 of expected" );
assert.ok( Math.abs( divOffset.left - iframeOffset.left ) < 0.25, "Check left within 0.25 of expected" );
} ); } );
element.simulate( "drag", { element.simulate( "drag", {

View File

@ -54,18 +54,12 @@ QUnit.test( "handle click on custom item menu", function( assert ) {
QUnit.test( "handle blur", function( assert ) { QUnit.test( "handle blur", function( assert ) {
var ready = assert.async(); var ready = assert.async();
assert.expect( 2 ); assert.expect( 2 );
var blurHandled = false, var index = 1,
index = 1,
element = $( "#menu1" ).menu( { element = $( "#menu1" ).menu( {
blur: function( event, ui ) { blur: function( event, ui ) {
// Ignore duplicate blur event fired by IE
if ( !blurHandled ) {
blurHandled = true;
assert.equal( event.type, "menublur", "blur event.type is 'menublur'" ); assert.equal( event.type, "menublur", "blur event.type is 'menublur'" );
assert.strictEqual( ui.item[ 0 ], element.children()[ index ], "ui.item" ); assert.strictEqual( ui.item[ 0 ], element.children()[ index ], "ui.item" );
} }
}
} ); } );
click( element, index ); click( element, index );
@ -80,18 +74,12 @@ QUnit.test( "handle blur", function( assert ) {
QUnit.test( "handle blur via click outside", function( assert ) { QUnit.test( "handle blur via click outside", function( assert ) {
var ready = assert.async(); var ready = assert.async();
assert.expect( 2 ); assert.expect( 2 );
var blurHandled = false, var index = 1,
index = 1,
element = $( "#menu1" ).menu( { element = $( "#menu1" ).menu( {
blur: function( event, ui ) { blur: function( event, ui ) {
// Ignore duplicate blur event fired by IE
if ( !blurHandled ) {
blurHandled = true;
assert.equal( event.type, "menublur", "blur event.type is 'menublur'" ); assert.equal( event.type, "menublur", "blur event.type is 'menublur'" );
assert.strictEqual( ui.item[ 0 ], element.children()[ index ], "ui.item" ); assert.strictEqual( ui.item[ 0 ], element.children()[ index ], "ui.item" );
} }
}
} ); } );
click( element, index ); click( element, index );

View File

@ -294,18 +294,9 @@ QUnit.test( "{ forcePlaceholderSize: true } table rows", function( assert ) {
placeholder: "test", placeholder: "test",
forcePlaceholderSize: true, forcePlaceholderSize: true,
start: function( event, ui ) { start: function( event, ui ) {
// Support: IE 11+, Edge <79 only
// In IE & Edge Legacy these values may differ a little
// when jQuery >=3.0 <3.2 is used.
if ( jqMinor === "3.0." || jqMinor === "3.1." ) {
assert.ok( Math.abs( ui.placeholder.height() - ui.item.height() ) < 0.25,
"placeholder height is within 0.25 px of item's" );
} else {
assert.equal( ui.placeholder.height(), ui.item.height(), assert.equal( ui.placeholder.height(), ui.item.height(),
"placeholder is same height as item" ); "placeholder is same height as item" );
} }
}
} ); } );
// First row has a non-standard height // First row has a non-standard height

View File

@ -293,9 +293,7 @@ QUnit.test( "._getCreateOptions()", function( assert ) {
assert.deepEqual( superOptions, {}, "Base implementation returns empty object" ); assert.deepEqual( superOptions, {}, "Base implementation returns empty object" );
// Support: IE8 assert.strictEqual( this.window[ 0 ], window, "this.window is properly defined" );
// Strict equality fails when comparing this.window in ie8
assert.equal( this.window[ 0 ], window, "this.window is properly defined" );
assert.strictEqual( this.document[ 0 ], document, "this.document is properly defined" ); assert.strictEqual( this.document[ 0 ], document, "this.document is properly defined" );
return { return {

View File

@ -18,12 +18,7 @@
vertical-align: middle; vertical-align: middle;
text-align: center; text-align: center;
-webkit-user-select: none; -webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none; user-select: none;
/* Support: IE <= 11 */
overflow: visible;
} }
.ui-button, .ui-button,
@ -74,7 +69,7 @@ input.ui-button.ui-icon-notext .ui-icon {
} }
/* workarounds */ /* workarounds */
/* Support: Firefox 5 - 40 */ /* Support: Firefox 5 - 125+ */
input.ui-button::-moz-focus-inner, input.ui-button::-moz-focus-inner,
button.ui-button::-moz-focus-inner { button.ui-button::-moz-focus-inner {
border: 0; border: 0;

View File

@ -54,9 +54,6 @@
/* Spinner specific style fixes */ /* Spinner specific style fixes */
.ui-controlgroup-vertical .ui-spinner-input { .ui-controlgroup-vertical .ui-spinner-input {
/* Support: IE8 only, Android < 4.4 only */
width: 75%;
width: calc( 100% - 2.4em ); width: calc( 100% - 2.4em );
} }
.ui-controlgroup-vertical .ui-spinner .ui-spinner-up { .ui-controlgroup-vertical .ui-spinner .ui-spinner-up {

View File

@ -50,7 +50,6 @@
left: 0; left: 0;
position: absolute; position: absolute;
opacity: 0; opacity: 0;
-ms-filter: "alpha(opacity=0)"; /* support: IE8 */
} }
.ui-front { .ui-front {

View File

@ -7,6 +7,5 @@
* https://jquery.org/license * https://jquery.org/license
*/ */
.ui-draggable-handle { .ui-draggable-handle {
-ms-touch-action: none;
touch-action: none; touch-action: none;
} }

View File

@ -21,8 +21,6 @@
.ui-menu .ui-menu-item { .ui-menu .ui-menu-item {
margin: 0; margin: 0;
cursor: pointer; cursor: pointer;
/* support: IE10, see #8844 */
list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
} }
.ui-menu .ui-menu-item-wrapper { .ui-menu .ui-menu-item-wrapper {
position: relative; position: relative;

View File

@ -20,7 +20,6 @@
.ui-progressbar .ui-progressbar-overlay { .ui-progressbar .ui-progressbar-overlay {
background: url("data:image/gif;base64,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"); background: url("data:image/gif;base64,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");
height: 100%; height: 100%;
-ms-filter: "alpha(opacity=25)"; /* support: IE8 */
opacity: 0.25; opacity: 0.25;
} }
.ui-progressbar-indeterminate .ui-progressbar-value { .ui-progressbar-indeterminate .ui-progressbar-value {

View File

@ -13,7 +13,6 @@
position: absolute; position: absolute;
font-size: 0.1px; font-size: 0.1px;
display: block; display: block;
-ms-touch-action: none;
touch-action: none; touch-action: none;
} }
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-disabled .ui-resizable-handle,

View File

@ -7,7 +7,6 @@
* https://jquery.org/license * https://jquery.org/license
*/ */
.ui-selectable { .ui-selectable {
-ms-touch-action: none;
touch-action: none; touch-action: none;
} }
.ui-selectable-helper { .ui-selectable-helper {

View File

@ -18,7 +18,6 @@
width: 1.2em; width: 1.2em;
height: 1.2em; height: 1.2em;
cursor: pointer; cursor: pointer;
-ms-touch-action: none;
touch-action: none; touch-action: none;
} }
.ui-slider .ui-slider-range { .ui-slider .ui-slider-range {
@ -30,12 +29,6 @@
background-position: 0 0; background-position: 0 0;
} }
/* support: IE8 - See #6727 */
.ui-slider.ui-state-disabled .ui-slider-handle,
.ui-slider.ui-state-disabled .ui-slider-range {
filter: inherit;
}
.ui-slider-horizontal { .ui-slider-horizontal {
height: .8em; height: .8em;
} }

View File

@ -7,6 +7,5 @@
* https://jquery.org/license * https://jquery.org/license
*/ */
.ui-sortable-handle { .ui-sortable-handle {
-ms-touch-action: none;
touch-action: none; touch-action: none;
} }

View File

@ -172,19 +172,14 @@ a.ui-button:active,
.ui-widget-content .ui-priority-secondary, .ui-widget-content .ui-priority-secondary,
.ui-widget-header .ui-priority-secondary { .ui-widget-header .ui-priority-secondary {
opacity: .7; opacity: .7;
-ms-filter: "alpha(opacity=70)"; /* support: IE8 */
font-weight: normal; font-weight: normal;
} }
.ui-state-disabled, .ui-state-disabled,
.ui-widget-content .ui-state-disabled, .ui-widget-content .ui-state-disabled,
.ui-widget-header .ui-state-disabled { .ui-widget-header .ui-state-disabled {
opacity: .35; opacity: .35;
-ms-filter: "alpha(opacity=35)"; /* support: IE8 */
background-image: none; background-image: none;
} }
.ui-state-disabled .ui-icon {
-ms-filter: "alpha(opacity=35)"; /* support: IE8 - See #6059 */
}
/* Icons /* Icons
----------------------------------*/ ----------------------------------*/
@ -438,9 +433,7 @@ a.ui-button:active,
.ui-widget-overlay { .ui-widget-overlay {
background: #aaaaaa/*{bgColorOverlay}*/ /*{bgImgUrlOverlay}*/ /*{bgOverlayXPos}*/ /*{bgOverlayYPos}*/ /*{bgOverlayRepeat}*/; background: #aaaaaa/*{bgColorOverlay}*/ /*{bgImgUrlOverlay}*/ /*{bgOverlayXPos}*/ /*{bgOverlayYPos}*/ /*{bgOverlayRepeat}*/;
opacity: .3/*{opacityOverlay}*/; opacity: .3/*{opacityOverlay}*/;
-ms-filter: "alpha(opacity=30)"/*{opacityFilterOverlay}*/; /* support: IE8 */
} }
.ui-widget-shadow { .ui-widget-shadow {
-webkit-box-shadow: 0/*{offsetLeftShadow}*/ 0/*{offsetTopShadow}*/ 5px/*{thicknessShadow}*/ #666666/*{bgColorShadow}*/;
box-shadow: 0/*{offsetLeftShadow}*/ 0/*{offsetTopShadow}*/ 5px/*{thicknessShadow}*/ #666666/*{bgColorShadow}*/; box-shadow: 0/*{offsetLeftShadow}*/ 0/*{offsetTopShadow}*/ 5px/*{thicknessShadow}*/ #666666/*{bgColorShadow}*/;
} }

View File

@ -7,14 +7,10 @@ define( [
"./data", "./data",
"./disable-selection", "./disable-selection",
"./focusable", "./focusable",
"./form",
"./ie",
"./keycode", "./keycode",
"./labels", "./labels",
"./jquery-patch", "./jquery-patch",
"./plugin", "./plugin",
"./safe-active-element",
"./safe-blur",
"./scroll-parent", "./scroll-parent",
"./tabbable", "./tabbable",
"./unique-id", "./unique-id",

View File

@ -81,12 +81,9 @@ function camelCase( string ) {
function getElementStyles( elem ) { function getElementStyles( elem ) {
var key, len, var key, len,
style = elem.ownerDocument.defaultView ? style = elem.ownerDocument.defaultView.getComputedStyle( elem ),
elem.ownerDocument.defaultView.getComputedStyle( elem, null ) :
elem.currentStyle,
styles = {}; styles = {};
if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {
len = style.length; len = style.length;
while ( len-- ) { while ( len-- ) {
key = style[ len ]; key = style[ len ];
@ -95,15 +92,6 @@ function getElementStyles( elem ) {
} }
} }
// Support: Opera, IE <9
} else {
for ( key in style ) {
if ( typeof style[ key ] === "string" ) {
styles[ key ] = style[ key ];
}
}
}
return styles; return styles;
} }

View File

@ -62,20 +62,10 @@ $.ui.focusable = function( element, hasTabindex ) {
focusableIfVisible = hasTabindex; focusableIfVisible = hasTabindex;
} }
return focusableIfVisible && $( element ).is( ":visible" ) && visible( $( element ) ); return focusableIfVisible && $( element ).is( ":visible" ) &&
$( element ).css( "visibility" ) === "visible";
}; };
// Support: IE 8 only
// IE 8 doesn't resolve inherit to visible/hidden for computed values
function visible( element ) {
var visibility = element.css( "visibility" );
while ( visibility === "inherit" ) {
element = element.parent();
visibility = element.css( "visibility" );
}
return visibility === "visible";
}
$.extend( $.expr.pseudos, { $.extend( $.expr.pseudos, {
focusable: function( element ) { focusable: function( element ) {
return $.ui.focusable( element, $.attr( element, "tabindex" ) != null ); return $.ui.focusable( element, $.attr( element, "tabindex" ) != null );

View File

@ -20,7 +20,6 @@
// AMD. Register as an anonymous module. // AMD. Register as an anonymous module.
define( [ define( [
"jquery", "jquery",
"./form",
"./version" "./version"
], factory ); ], factory );
} else { } else {
@ -45,7 +44,7 @@ return $.ui.formResetMixin = {
}, },
_bindFormResetHandler: function() { _bindFormResetHandler: function() {
this.form = this.element._form(); this.form = $( this.element.prop( "form" ) );
if ( !this.form.length ) { if ( !this.form.length ) {
return; return;
} }

View File

@ -1,23 +0,0 @@
( function( factory ) {
"use strict";
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
define( [ "jquery", "./version" ], factory );
} else {
// Browser globals
factory( jQuery );
}
} )( function( $ ) {
"use strict";
// Support: IE8 Only
// IE8 does not support the form attribute and when it is supplied. It overwrites the form prop
// with a string, so we need to find the proper form.
return $.fn._form = function() {
return typeof this[ 0 ].form === "string" ? this.closest( "form" ) : $( this[ 0 ].form );
};
} );

View File

@ -1,18 +0,0 @@
( function( factory ) {
"use strict";
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
define( [ "jquery", "./version" ], factory );
} else {
// Browser globals
factory( jQuery );
}
} )( function( $ ) {
"use strict";
// This file is deprecated
return $.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
} );

View File

@ -39,9 +39,8 @@ return $.fn.labels = function() {
return this.pushStack( this[ 0 ].labels ); return this.pushStack( this[ 0 ].labels );
} }
// Support: IE <= 11, FF <= 37, Android <= 2.3 only // If `control.labels` is empty - e.g. inside of document fragments - find
// Above browsers do not support control.labels. Everything below is to support them // the labels manually
// as well as document fragments. control.labels does not work on document fragments
labels = this.eq( 0 ).parents( "label" ); labels = this.eq( 0 ).parents( "label" );
// Look for the label based on the id // Look for the label based on the id

View File

@ -1,44 +0,0 @@
( function( factory ) {
"use strict";
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
define( [ "jquery", "./version" ], factory );
} else {
// Browser globals
factory( jQuery );
}
} )( function( $ ) {
"use strict";
return $.ui.safeActiveElement = function( document ) {
var activeElement;
// Support: IE 9 only
// IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe>
try {
activeElement = document.activeElement;
} catch ( error ) {
activeElement = document.body;
}
// Support: IE 9 - 11 only
// IE may return null instead of an element
// Interestingly, this only seems to occur when NOT in an iframe
if ( !activeElement ) {
activeElement = document.body;
}
// Support: IE 11 only
// IE11 returns a seemingly empty object in some cases when accessing
// document.activeElement from an <iframe>
if ( !activeElement.nodeName ) {
activeElement = document.body;
}
return activeElement;
};
} );

View File

@ -1,25 +0,0 @@
( function( factory ) {
"use strict";
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
define( [ "jquery", "./version" ], factory );
} else {
// Browser globals
factory( jQuery );
}
} )( function( $ ) {
"use strict";
return $.ui.safeBlur = function( element ) {
// Support: IE9 - 10 only
// If the <body> is blurred, IE will switch windows, see #9420
if ( element && element.nodeName.toLowerCase() !== "body" ) {
$( element ).trigger( "blur" );
}
};
} );

View File

@ -187,13 +187,7 @@ return $.widget( "ui.accordion", {
this._super( value ); this._super( value );
this.element.attr( "aria-disabled", value ); this.element.attr( "aria-disabled", value );
// Support: IE8 Only
// #5332 / #6059 - opacity doesn't cascade to positioned elements in IE
// so we need to add the disabled class to the headers and panels
this._toggleClass( null, "ui-state-disabled", !!value ); this._toggleClass( null, "ui-state-disabled", !!value );
this._toggleClass( this.headers.add( this.headers.next() ), null, "ui-state-disabled",
!!value );
}, },
_keydown: function( event ) { _keydown: function( event ) {
@ -611,10 +605,6 @@ return $.widget( "ui.accordion", {
this._removeClass( prev, "ui-accordion-header-active" ) this._removeClass( prev, "ui-accordion-header-active" )
._addClass( prev, "ui-accordion-header-collapsed" ); ._addClass( prev, "ui-accordion-header-collapsed" );
// Work around for rendering bug in IE (#5421)
if ( toHide.length ) {
toHide.parent()[ 0 ].className = toHide.parent()[ 0 ].className;
}
this._trigger( "activate", null, data ); this._trigger( "activate", null, data );
} }
} ); } );

View File

@ -27,7 +27,6 @@
"./menu", "./menu",
"../keycode", "../keycode",
"../position", "../position",
"../safe-active-element",
"../version", "../version",
"../widget" "../widget"
], factory ); ], factory );
@ -84,9 +83,9 @@ $.widget( "ui.autocomplete", {
// Textareas are always multi-line // Textareas are always multi-line
// Inputs are always single-line, even if inside a contentEditable element // Inputs are always single-line, even if inside a contentEditable element
// IE also treats inputs as contentEditable // All other element types are determined by whether they're contentEditable
// All other element types are determined by whether or not they're contentEditable this.isMultiLine = isTextarea ||
this.isMultiLine = isTextarea || !isInput && this._isContentEditable( this.element ); !isInput && this.element.prop( "contentEditable" ) === "true";
this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ]; this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ];
this.isNewMenu = true; this.isNewMenu = true;
@ -150,7 +149,6 @@ $.widget( "ui.autocomplete", {
// Different browsers have different default behavior for escape // Different browsers have different default behavior for escape
// Single press can mean undo or clear // Single press can mean undo or clear
// Double press in IE means clear the whole form
event.preventDefault(); event.preventDefault();
} }
break; break;
@ -219,16 +217,6 @@ $.widget( "ui.autocomplete", {
role: null role: null
} ) } )
.hide() .hide()
// Support: IE 11 only, Edge <= 14
// For other browsers, we preventDefault() on the mousedown event
// to keep the dropdown from taking focus from the input. This doesn't
// work for IE/Edge, causing problems with selection and scrolling (#9638)
// Happily, IE and Edge support an "unselectable" attribute that
// prevents an element from receiving focus, exactly what we want here.
.attr( {
"unselectable": "on"
} )
.menu( "instance" ); .menu( "instance" );
this._addClass( this.menu.element, "ui-autocomplete", "ui-front" ); this._addClass( this.menu.element, "ui-autocomplete", "ui-front" );
@ -241,7 +229,7 @@ $.widget( "ui.autocomplete", {
menufocus: function( event, ui ) { menufocus: function( event, ui ) {
var label, item; var label, item;
// support: Firefox // Support: Firefox
// Prevent accidental activation of menu items in Firefox (#7024 #9118) // Prevent accidental activation of menu items in Firefox (#7024 #9118)
if ( this.isNewMenu ) { if ( this.isNewMenu ) {
this.isNewMenu = false; this.isNewMenu = false;
@ -279,17 +267,9 @@ $.widget( "ui.autocomplete", {
previous = this.previous; previous = this.previous;
// Only trigger when focus was lost (click on menu) // Only trigger when focus was lost (click on menu)
if ( this.element[ 0 ] !== $.ui.safeActiveElement( this.document[ 0 ] ) ) { if ( this.element[ 0 ] !== this.document[ 0 ].activeElement ) {
this.element.trigger( "focus" ); this.element.trigger( "focus" );
this.previous = previous; this.previous = previous;
// #6109 - IE triggers two focus events and the second
// is asynchronous, so we need to reset the previous
// term synchronously and asynchronously :-(
this._delay( function() {
this.previous = previous;
this.selectedItem = item;
} );
} }
if ( false !== this._trigger( "select", event, { item: item } ) ) { if ( false !== this._trigger( "select", event, { item: item } ) ) {
@ -608,24 +588,6 @@ $.widget( "ui.autocomplete", {
// Prevents moving cursor to beginning/end of the text field in some browsers // Prevents moving cursor to beginning/end of the text field in some browsers
event.preventDefault(); event.preventDefault();
} }
},
// Support: Chrome <=50
// We should be able to just use this.element.prop( "isContentEditable" )
// but hidden elements always report false in Chrome.
// https://code.google.com/p/chromium/issues/detail?id=313082
_isContentEditable: function( element ) {
if ( !element.length ) {
return false;
}
var editable = element.prop( "contentEditable" );
if ( editable === "inherit" ) {
return this._isContentEditable( element.parent() );
}
return editable === "true";
} }
} ); } );

View File

@ -109,9 +109,9 @@ $.widget( "ui.button", {
if ( event.keyCode === $.ui.keyCode.SPACE ) { if ( event.keyCode === $.ui.keyCode.SPACE ) {
event.preventDefault(); event.preventDefault();
// Support: PhantomJS <= 1.9, IE 8 Only // If a native click is available use it, so we
// If a native click is available use it so we actually cause navigation // actually cause navigation. Otherwise, just trigger
// otherwise just trigger a click event // a click event.
if ( this.element[ 0 ].click ) { if ( this.element[ 0 ].click ) {
this.element[ 0 ].click(); this.element[ 0 ].click();
} else { } else {

View File

@ -168,7 +168,7 @@ $.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {
// Not inside a form, check all inputs that also are not inside a form // Not inside a form, check all inputs that also are not inside a form
group = $( nameSelector ).filter( function() { group = $( nameSelector ).filter( function() {
return $( this )._form().length === 0; return $( $( this ).prop( "form" ) ).length === 0;
} ); } );
} }

View File

@ -31,8 +31,6 @@
"../focusable", "../focusable",
"../keycode", "../keycode",
"../position", "../position",
"../safe-active-element",
"../safe-blur",
"../tabbable", "../tabbable",
"../unique-id", "../unique-id",
"../version", "../version",
@ -229,7 +227,7 @@ $.widget( "ui.dialog", {
// Hiding a focused element doesn't trigger blur in WebKit // Hiding a focused element doesn't trigger blur in WebKit
// so in case we have nothing to focus on, explicitly blur the active element // so in case we have nothing to focus on, explicitly blur the active element
// https://bugs.webkit.org/show_bug.cgi?id=47182 // https://bugs.webkit.org/show_bug.cgi?id=47182
$.ui.safeBlur( $.ui.safeActiveElement( this.document[ 0 ] ) ); $( this.document[ 0 ].activeElement ).trigger( "blur" );
} }
this._hide( this.uiDialog, this.options.hide, function() { this._hide( this.uiDialog, this.options.hide, function() {
@ -273,7 +271,7 @@ $.widget( "ui.dialog", {
} }
this._isOpen = true; this._isOpen = true;
this.opener = $( $.ui.safeActiveElement( this.document[ 0 ] ) ); this.opener = $( this.document[ 0 ].activeElement );
this._size(); this._size();
this._position(); this._position();
@ -329,7 +327,7 @@ $.widget( "ui.dialog", {
}, },
_restoreTabbableFocus: function() { _restoreTabbableFocus: function() {
var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ), var activeElement = this.document[ 0 ].activeElement,
isActive = this.uiDialog[ 0 ] === activeElement || isActive = this.uiDialog[ 0 ] === activeElement ||
$.contains( this.uiDialog[ 0 ], activeElement ); $.contains( this.uiDialog[ 0 ], activeElement );
if ( !isActive ) { if ( !isActive ) {
@ -340,11 +338,6 @@ $.widget( "ui.dialog", {
_keepFocus: function( event ) { _keepFocus: function( event ) {
event.preventDefault(); event.preventDefault();
this._restoreTabbableFocus(); this._restoreTabbableFocus();
// support: IE
// IE <= 8 doesn't prevent moving focus even with event.preventDefault()
// so we check again later
this._delay( this._restoreTabbableFocus );
}, },
_createWrapper: function() { _createWrapper: function() {
@ -427,9 +420,6 @@ $.widget( "ui.dialog", {
} }
} ); } );
// Support: IE
// Use type="button" to prevent enter keypresses in textboxes from closing the
// dialog in IE (#9312)
this.uiDialogTitlebarClose = $( "<button type='button'></button>" ) this.uiDialogTitlebarClose = $( "<button type='button'></button>" )
.button( { .button( {
label: $( "<a>" ).text( this.options.closeText ).html(), label: $( "<a>" ).text( this.options.closeText ).html(),

View File

@ -25,8 +25,6 @@
"./mouse", "./mouse",
"../data", "../data",
"../plugin", "../plugin",
"../safe-active-element",
"../safe-blur",
"../scroll-parent", "../scroll-parent",
"../version", "../version",
"../widget" "../widget"
@ -147,7 +145,7 @@ $.widget( "ui.draggable", $.ui.mouse, {
}, },
_blurActiveElement: function( event ) { _blurActiveElement: function( event ) {
var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ), var activeElement = this.document[ 0 ].activeElement,
target = $( event.target ); target = $( event.target );
// Don't blur if the event occurred on an element that is within // Don't blur if the event occurred on an element that is within
@ -158,7 +156,7 @@ $.widget( "ui.draggable", $.ui.mouse, {
} }
// Blur any element that currently has focus, see #4261 // Blur any element that currently has focus, see #4261
$.ui.safeBlur( activeElement ); $( activeElement ).trigger( "blur" );
}, },
_mouseStart: function( event ) { _mouseStart: function( event ) {

View File

@ -26,7 +26,6 @@
"jquery", "jquery",
"../keycode", "../keycode",
"../position", "../position",
"../safe-active-element",
"../unique-id", "../unique-id",
"../version", "../version",
"../widget" "../widget"
@ -87,7 +86,7 @@ return $.widget( "ui.menu", {
}, },
"click .ui-menu-item": function( event ) { "click .ui-menu-item": function( event ) {
var target = $( event.target ); var target = $( event.target );
var active = $( $.ui.safeActiveElement( this.document[ 0 ] ) ); var active = $( this.document[ 0 ].activeElement );
if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) { if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) {
this.select( event ); this.select( event );
@ -131,7 +130,7 @@ return $.widget( "ui.menu", {
this._delay( function() { this._delay( function() {
var notContained = !$.contains( var notContained = !$.contains(
this.element[ 0 ], this.element[ 0 ],
$.ui.safeActiveElement( this.document[ 0 ] ) this.document[ 0 ].activeElement
); );
if ( notContained ) { if ( notContained ) {
this.collapseAll( event ); this.collapseAll( event );

View File

@ -20,7 +20,6 @@
// AMD. Register as an anonymous module. // AMD. Register as an anonymous module.
define( [ define( [
"jquery", "jquery",
"../ie",
"../version", "../version",
"../widget" "../widget"
], factory ); ], factory );
@ -90,12 +89,10 @@ return $.widget( "ui.mouse", {
this._mouseDownEvent = event; this._mouseDownEvent = event;
var that = this, var that = this,
btnIsLeft = ( event.which === 1 ), btnIsLeft = event.which === 1,
elIsCancel = typeof this.options.cancel === "string" ?
// event.target.nodeName works around a bug in IE 8 with $( event.target ).closest( this.options.cancel ).length :
// disabled inputs (#7620) false;
elIsCancel = ( typeof this.options.cancel === "string" && event.target.nodeName ?
$( event.target ).closest( this.options.cancel ).length : false );
if ( !btnIsLeft || elIsCancel || !this._mouseCapture( event ) ) { if ( !btnIsLeft || elIsCancel || !this._mouseCapture( event ) ) {
return true; return true;
} }
@ -141,18 +138,8 @@ return $.widget( "ui.mouse", {
_mouseMove: function( event ) { _mouseMove: function( event ) {
// Only check for mouseups outside the document if you've moved inside the document // Only check for mouseups outside the document if you've moved inside the document
// at least once. This prevents the firing of mouseup in the case of IE<9, which will // at least once.
// fire a mousemove event if content is placed under the cursor. See #7778 if ( this._mouseMoved && !event.which ) {
// Support: IE <9
if ( this._mouseMoved ) {
// IE mouseup check - mouseup happened when mouse was out of window
if ( $.ui.ie && ( !document.documentMode || document.documentMode < 9 ) &&
!event.button ) {
return this._mouseUp( event );
// Iframe mouseup check - mouseup occurred in another document
} else if ( !event.which ) {
// Support: Safari <=8 - 9 // Support: Safari <=8 - 9
// Safari sets which to 0 if you press any of the following keys // Safari sets which to 0 if you press any of the following keys
@ -164,7 +151,6 @@ return $.widget( "ui.mouse", {
return this._mouseUp( event ); return this._mouseUp( event );
} }
} }
}
if ( event.which || event.button ) { if ( event.which || event.button ) {
this._mouseMoved = true; this._mouseMoved = true;

View File

@ -149,9 +149,8 @@ $.widget( "ui.resizable", $.ui.mouse, {
}; };
this.element.css( margins ); this.element.css( margins );
this.originalElement.css( "margin", 0 );
// support: Safari // Support: Safari
// Prevent Safari textarea resize // Prevent Safari textarea resize
this.originalResizeStyle = this.originalElement.css( "resize" ); this.originalResizeStyle = this.originalElement.css( "resize" );
this.originalElement.css( "resize", "none" ); this.originalElement.css( "resize", "none" );
@ -162,10 +161,6 @@ $.widget( "ui.resizable", $.ui.mouse, {
display: "block" display: "block"
} ) ); } ) );
// Support: IE9
// avoid IE jump (hard set the margin)
this.originalElement.css( margins );
this._proportionallyResize(); this._proportionallyResize();
} }

View File

@ -167,12 +167,6 @@ return $.widget( "ui.selectmenu", [ $.ui.formResetMixin, {
role: "listbox", role: "listbox",
select: function( event, ui ) { select: function( event, ui ) {
event.preventDefault(); event.preventDefault();
// Support: IE8
// If the item was selected via a click, the text selection
// will be destroyed in IE
that._setSelection();
that._select( ui.item.data( "ui-selectmenu-item" ), event ); that._select( ui.item.data( "ui-selectmenu-item" ), event );
}, },
focus: function( event, ui ) { focus: function( event, ui ) {
@ -409,20 +403,9 @@ return $.widget( "ui.selectmenu", [ $.ui.formResetMixin, {
return; return;
} }
if ( window.getSelection ) {
selection = window.getSelection(); selection = window.getSelection();
selection.removeAllRanges(); selection.removeAllRanges();
selection.addRange( this.range ); selection.addRange( this.range );
// Support: IE8
} else {
this.range.select();
}
// Support: IE
// Setting the text selection kills the button focus in IE, but
// restoring the focus doesn't kill the selection.
this.button.trigger( "focus" );
}, },
_documentClick: { _documentClick: {
@ -442,18 +425,10 @@ return $.widget( "ui.selectmenu", [ $.ui.formResetMixin, {
// Prevent text selection from being reset when interacting with the selectmenu (#10144) // Prevent text selection from being reset when interacting with the selectmenu (#10144)
mousedown: function() { mousedown: function() {
var selection; var selection = window.getSelection();
if ( window.getSelection ) {
selection = window.getSelection();
if ( selection.rangeCount ) { if ( selection.rangeCount ) {
this.range = selection.getRangeAt( 0 ); this.range = selection.getRangeAt( 0 );
} }
// Support: IE8
} else {
this.range = document.selection.createRange();
}
}, },
click: function( event ) { click: function( event ) {
@ -643,11 +618,7 @@ return $.widget( "ui.selectmenu", [ $.ui.formResetMixin, {
_resizeMenu: function() { _resizeMenu: function() {
this.menu.outerWidth( Math.max( this.menu.outerWidth( Math.max(
this.button.outerWidth(), this.button.outerWidth(),
this.menu.width( "" ).outerWidth()
// Support: IE10
// IE10 wraps long text (possibly a rounding bug)
// so we add 1px to avoid the wrapping
this.menu.width( "" ).outerWidth() + 1
) ); ) );
}, },

View File

@ -24,7 +24,6 @@
"jquery", "jquery",
"./mouse", "./mouse",
"../data", "../data",
"../ie",
"../scroll-parent", "../scroll-parent",
"../version", "../version",
"../widget" "../widget"
@ -276,10 +275,6 @@ return $.widget( "ui.sortable", $.ui.mouse, {
if ( o.cursor && o.cursor !== "auto" ) { // cursor option if ( o.cursor && o.cursor !== "auto" ) { // cursor option
body = this.document.find( "body" ); body = this.document.find( "body" );
// Support: IE
this.storedCursor = body.css( "cursor" );
body.css( "cursor", o.cursor );
this.storedStylesheet = this.storedStylesheet =
$( "<style>*{ cursor: " + o.cursor + " !important; }</style>" ).appendTo( body ); $( "<style>*{ cursor: " + o.cursor + " !important; }</style>" ).appendTo( body );
} }
@ -1197,11 +1192,9 @@ return $.widget( "ui.sortable", $.ui.mouse, {
po.top += this.scrollParent.scrollTop(); po.top += this.scrollParent.scrollTop();
} }
// This needs to be actually done for all browsers, since pageX/pageY includes this // This needs to be actually done for all browsers, since pageX/pageY includes
// information with an ugly IE fix // this information.
if ( this.offsetParent[ 0 ] === this.document[ 0 ].body || if ( this.offsetParent[ 0 ] === this.document[ 0 ].body ) {
( this.offsetParent[ 0 ].tagName &&
this.offsetParent[ 0 ].tagName.toLowerCase() === "html" && $.ui.ie ) ) {
po = { top: 0, left: 0 }; po = { top: 0, left: 0 };
} }
@ -1549,8 +1542,7 @@ return $.widget( "ui.sortable", $.ui.mouse, {
} }
//Do what was originally in plugins //Do what was originally in plugins
if ( this.storedCursor ) { if ( this.storedStylesheet ) {
this.document.find( "body" ).css( "cursor", this.storedCursor );
this.storedStylesheet.remove(); this.storedStylesheet.remove();
} }
if ( this._storedOpacity ) { if ( this._storedOpacity ) {

View File

@ -27,7 +27,6 @@
"./button", "./button",
"../version", "../version",
"../keycode", "../keycode",
"../safe-active-element",
"../widget" "../widget"
], factory ); ], factory );
} else { } else {
@ -131,11 +130,6 @@ $.widget( "ui.spinner", {
this.previous = this.element.val(); this.previous = this.element.val();
}, },
blur: function( event ) { blur: function( event ) {
if ( this.cancelBlur ) {
delete this.cancelBlur;
return;
}
this._stop(); this._stop();
this._refresh(); this._refresh();
if ( this.previous !== this.element.val() ) { if ( this.previous !== this.element.val() ) {
@ -143,7 +137,7 @@ $.widget( "ui.spinner", {
} }
}, },
mousewheel: function( event, delta ) { mousewheel: function( event, delta ) {
var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ); var activeElement = this.document[ 0 ].activeElement;
var isActive = this.element[ 0 ] === activeElement; var isActive = this.element[ 0 ] === activeElement;
if ( !isActive || !delta ) { if ( !isActive || !delta ) {
@ -171,20 +165,13 @@ $.widget( "ui.spinner", {
// If the input is focused then this.previous is properly set from // If the input is focused then this.previous is properly set from
// when the input first received focus. If the input is not focused // when the input first received focus. If the input is not focused
// then we need to set this.previous based on the value before spinning. // then we need to set this.previous based on the value before spinning.
previous = this.element[ 0 ] === $.ui.safeActiveElement( this.document[ 0 ] ) ? previous = this.element[ 0 ] === this.document[ 0 ].activeElement ?
this.previous : this.element.val(); this.previous : this.element.val();
function checkFocus() { function checkFocus() {
var isActive = this.element[ 0 ] === $.ui.safeActiveElement( this.document[ 0 ] ); var isActive = this.element[ 0 ] === this.document[ 0 ].activeElement;
if ( !isActive ) { if ( !isActive ) {
this.element.trigger( "focus" ); this.element.trigger( "focus" );
this.previous = previous; this.previous = previous;
// support: IE
// IE sets focus asynchronously, so we need to check if focus
// moved off of the input because the user clicked on the button.
this._delay( function() {
this.previous = previous;
} );
} }
} }
@ -192,16 +179,6 @@ $.widget( "ui.spinner", {
event.preventDefault(); event.preventDefault();
checkFocus.call( this ); checkFocus.call( this );
// Support: IE
// IE doesn't prevent moving focus even with event.preventDefault()
// so we set a flag to know when we should ignore the blur event
// and check (again) if focus moved off of the input.
this.cancelBlur = true;
this._delay( function() {
delete this.cancelBlur;
checkFocus.call( this );
} );
if ( this._start( event ) === false ) { if ( this._start( event ) === false ) {
return; return;
} }

View File

@ -25,7 +25,6 @@
define( [ define( [
"jquery", "jquery",
"../keycode", "../keycode",
"../safe-active-element",
"../unique-id", "../unique-id",
"../version", "../version",
"../widget" "../widget"
@ -171,7 +170,7 @@ $.widget( "ui.tabs", {
}, },
_tabKeydown: function( event ) { _tabKeydown: function( event ) {
var focusedTab = $( $.ui.safeActiveElement( this.document[ 0 ] ) ).closest( "li" ), var focusedTab = $( this.document[ 0 ].activeElement ).closest( "li" ),
selectedIndex = this.tabs.index( focusedTab ), selectedIndex = this.tabs.index( focusedTab ),
goingForward = true; goingForward = true;
@ -408,18 +407,6 @@ $.widget( "ui.tabs", {
if ( $( this ).is( ".ui-state-disabled" ) ) { if ( $( this ).is( ".ui-state-disabled" ) ) {
event.preventDefault(); event.preventDefault();
} }
} )
// Support: IE <9
// Preventing the default action in mousedown doesn't prevent IE
// from focusing the element, so if the anchor gets focused, blur.
// We don't have to worry about focusing the previously focused
// element since clicking on a non-focusable element should focus
// the body anyway.
.on( "focus" + this.eventNamespace, ".ui-tabs-anchor", function() {
if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) {
this.blur();
}
} ); } );
this.tabs = this.tablist.find( "> li:has(a[href])" ) this.tabs = this.tablist.find( "> li:has(a[href])" )
@ -877,10 +864,7 @@ $.widget( "ui.tabs", {
_ajaxSettings: function( anchor, event, eventData ) { _ajaxSettings: function( anchor, event, eventData ) {
var that = this; var that = this;
return { return {
url: anchor.attr( "href" ),
// Support: IE <11 only
// Strip any hash that exists to prevent errors with the Ajax request
url: anchor.attr( "href" ).replace( /#.*$/, "" ),
beforeSend: function( jqXHR, settings ) { beforeSend: function( jqXHR, settings ) {
return that._trigger( "beforeLoad", event, return that._trigger( "beforeLoad", event,
$.extend( { jqXHR: jqXHR, ajaxSettings: settings }, eventData ) ); $.extend( { jqXHR: jqXHR, ajaxSettings: settings }, eventData ) );

View File

@ -227,10 +227,6 @@ $.widget( "ui.tooltip", {
content = contentOption.call( target[ 0 ], function( response ) { content = contentOption.call( target[ 0 ], function( response ) {
// IE may instantly serve a cached response for ajax requests
// delay this call to _open so the other call to _open runs first
that._delay( function() {
// Ignore async response if tooltip was closed already // Ignore async response if tooltip was closed already
if ( !target.data( "ui-tooltip-open" ) ) { if ( !target.data( "ui-tooltip-open" ) ) {
return; return;
@ -244,8 +240,7 @@ $.widget( "ui.tooltip", {
if ( event ) { if ( event ) {
event.type = eventType; event.type = eventType;
} }
this._open( event, target, response ); that._open( event, target, response );
} );
} ); } );
if ( content ) { if ( content ) {
this._open( event, target, content ); this._open( event, target, content );