mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
All: Drop support for IE & some other browsers (but mostly IE)
Closes gh-2249
This commit is contained in:
parent
daa6fb55b3
commit
bb49bd794b
@ -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
4
demos/bootstrap.js
vendored
@ -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" );
|
||||||
|
@ -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 {
|
||||||
|
@ -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 ];
|
||||||
}
|
}
|
||||||
|
@ -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 );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,11 +75,7 @@ $.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 } );
|
||||||
|
element.simulate( "blur" );
|
||||||
// Blur must be async for IE to handle it properly
|
|
||||||
setTimeout( function() {
|
|
||||||
element.simulate( "blur" );
|
|
||||||
} );
|
|
||||||
} );
|
} );
|
||||||
} );
|
} );
|
||||||
} );
|
} );
|
||||||
|
@ -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();
|
||||||
} );
|
} );
|
||||||
} );
|
} );
|
||||||
|
@ -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
|
$( "#check2" ).checkboxradio( "widget" ).simulate( "click" );
|
||||||
// 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();
|
|
||||||
} );
|
|
||||||
} );
|
} );
|
||||||
|
|
||||||
QUnit.test( "Handle form association via form attribute", function( assert ) {
|
QUnit.test( "Handle form association via form attribute", function( assert ) {
|
||||||
|
@ -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";
|
||||||
|
@ -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 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
@ -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,147 +96,131 @@ QUnit.test( "change", function( assert ) {
|
|||||||
assert.equal( $.datepicker._defaults.showOn, "focus", "Retain default showOn" );
|
assert.equal( $.datepicker._defaults.showOn, "focus", "Retain default showOn" );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
( function() {
|
QUnit.test( "invocation", function( assert ) {
|
||||||
var url = window.location.search;
|
var ready = assert.async();
|
||||||
url = decodeURIComponent( url.slice( url.indexOf( "swarmURL=" ) + 9 ) );
|
var button, image,
|
||||||
|
body = $( "body" );
|
||||||
|
|
||||||
// TODO: This test occassionally fails in IE in TestSwarm
|
assert.expect( 29 );
|
||||||
if ( $.ui.ie && url && url.indexOf( "http" ) === 0 ) {
|
|
||||||
return;
|
function step0() {
|
||||||
|
var inp = testHelper.initNewInput(),
|
||||||
|
dp = $( "#ui-datepicker-div" );
|
||||||
|
|
||||||
|
button = inp.siblings( "button" );
|
||||||
|
assert.ok( button.length === 0, "Focus - button absent" );
|
||||||
|
image = inp.siblings( "img" );
|
||||||
|
assert.ok( image.length === 0, "Focus - image absent" );
|
||||||
|
|
||||||
|
testHelper.onFocus( inp, function() {
|
||||||
|
assert.ok( dp.is( ":visible" ), "Focus - rendered on focus" );
|
||||||
|
inp.simulate( "keydown", { keyCode: $.ui.keyCode.ESCAPE } );
|
||||||
|
assert.ok( !dp.is( ":visible" ), "Focus - hidden on exit" );
|
||||||
|
step1();
|
||||||
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
QUnit.test( "invocation", function( assert ) {
|
function step1() {
|
||||||
var ready = assert.async();
|
|
||||||
var button, image,
|
|
||||||
isOldIE = $.ui.ie && ( !document.documentMode || document.documentMode < 9 ),
|
|
||||||
body = $( "body" );
|
|
||||||
|
|
||||||
assert.expect( isOldIE ? 25 : 29 );
|
var inp = testHelper.initNewInput(),
|
||||||
|
dp = $( "#ui-datepicker-div" );
|
||||||
|
|
||||||
function step0() {
|
testHelper.onFocus( inp, function() {
|
||||||
var inp = testHelper.initNewInput(),
|
assert.ok( dp.is( ":visible" ), "Focus - rendered on focus" );
|
||||||
dp = $( "#ui-datepicker-div" );
|
body.simulate( "mousedown", {} );
|
||||||
|
assert.ok( !dp.is( ":visible" ), "Focus - hidden on external click" );
|
||||||
|
inp.datepicker( "hide" ).datepicker( "destroy" );
|
||||||
|
|
||||||
button = inp.siblings( "button" );
|
step2();
|
||||||
assert.ok( button.length === 0, "Focus - button absent" );
|
} );
|
||||||
image = inp.siblings( "img" );
|
}
|
||||||
assert.ok( image.length === 0, "Focus - image absent" );
|
|
||||||
|
|
||||||
testHelper.onFocus( inp, function() {
|
function step2() {
|
||||||
assert.ok( dp.is( ":visible" ), "Focus - rendered on focus" );
|
var inp = testHelper.initNewInput( {
|
||||||
inp.simulate( "keydown", { keyCode: $.ui.keyCode.ESCAPE } );
|
showOn: "button",
|
||||||
assert.ok( !dp.is( ":visible" ), "Focus - hidden on exit" );
|
buttonText: "Popup"
|
||||||
step1();
|
} ),
|
||||||
} );
|
dp = $( "#ui-datepicker-div" );
|
||||||
}
|
|
||||||
|
|
||||||
function step1() {
|
assert.ok( !dp.is( ":visible" ), "Button - initially hidden" );
|
||||||
|
button = inp.siblings( "button" );
|
||||||
|
image = inp.siblings( "img" );
|
||||||
|
assert.ok( button.length === 1, "Button - button present" );
|
||||||
|
assert.ok( image.length === 0, "Button - image absent" );
|
||||||
|
assert.equal( button.text(), "Popup", "Button - button text" );
|
||||||
|
|
||||||
var inp = testHelper.initNewInput(),
|
testHelper.onFocus( inp, function() {
|
||||||
dp = $( "#ui-datepicker-div" );
|
assert.ok( !dp.is( ":visible" ), "Button - not rendered on focus" );
|
||||||
|
button.trigger( "click" );
|
||||||
|
assert.ok( dp.is( ":visible" ), "Button - rendered on button click" );
|
||||||
|
button.trigger( "click" );
|
||||||
|
assert.ok( !dp.is( ":visible" ), "Button - hidden on second button click" );
|
||||||
|
inp.datepicker( "hide" ).datepicker( "destroy" );
|
||||||
|
|
||||||
testHelper.onFocus( inp, function() {
|
step3();
|
||||||
assert.ok( dp.is( ":visible" ), "Focus - rendered on focus" );
|
} );
|
||||||
body.simulate( "mousedown", {} );
|
}
|
||||||
assert.ok( !dp.is( ":visible" ), "Focus - hidden on external click" );
|
|
||||||
inp.datepicker( "hide" ).datepicker( "destroy" );
|
|
||||||
|
|
||||||
step2();
|
function step3() {
|
||||||
} );
|
var inp = testHelper.initNewInput( {
|
||||||
}
|
showOn: "button",
|
||||||
|
buttonImageOnly: true,
|
||||||
|
buttonImage: "images/calendar.gif",
|
||||||
|
buttonText: "Cal"
|
||||||
|
} ),
|
||||||
|
dp = $( "#ui-datepicker-div" );
|
||||||
|
|
||||||
function step2() {
|
assert.ok( !dp.is( ":visible" ), "Image button - initially hidden" );
|
||||||
var inp = testHelper.initNewInput( {
|
button = inp.siblings( "button" );
|
||||||
showOn: "button",
|
assert.ok( button.length === 0, "Image button - button absent" );
|
||||||
buttonText: "Popup"
|
image = inp.siblings( "img" );
|
||||||
} ),
|
assert.ok( image.length === 1, "Image button - image present" );
|
||||||
dp = $( "#ui-datepicker-div" );
|
assert.ok( /images\/calendar\.gif$/.test( image.attr( "src" ) ), "Image button - image source" );
|
||||||
|
assert.equal( image.attr( "title" ), "Cal", "Image button - image text" );
|
||||||
|
|
||||||
assert.ok( !dp.is( ":visible" ), "Button - initially hidden" );
|
testHelper.onFocus( inp, function() {
|
||||||
button = inp.siblings( "button" );
|
assert.ok( !dp.is( ":visible" ), "Image button - not rendered on focus" );
|
||||||
image = inp.siblings( "img" );
|
image.trigger( "click" );
|
||||||
assert.ok( button.length === 1, "Button - button present" );
|
assert.ok( dp.is( ":visible" ), "Image button - rendered on image click" );
|
||||||
assert.ok( image.length === 0, "Button - image absent" );
|
image.trigger( "click" );
|
||||||
assert.equal( button.text(), "Popup", "Button - button text" );
|
assert.ok( !dp.is( ":visible" ), "Image button - hidden on second image click" );
|
||||||
|
inp.datepicker( "hide" ).datepicker( "destroy" );
|
||||||
|
|
||||||
testHelper.onFocus( inp, function() {
|
step4();
|
||||||
assert.ok( !dp.is( ":visible" ), "Button - not rendered on focus" );
|
} );
|
||||||
button.trigger( "click" );
|
}
|
||||||
assert.ok( dp.is( ":visible" ), "Button - rendered on button click" );
|
|
||||||
button.trigger( "click" );
|
|
||||||
assert.ok( !dp.is( ":visible" ), "Button - hidden on second button click" );
|
|
||||||
inp.datepicker( "hide" ).datepicker( "destroy" );
|
|
||||||
|
|
||||||
step3();
|
function step4() {
|
||||||
} );
|
var inp = testHelper.initNewInput( {
|
||||||
}
|
showOn: "both",
|
||||||
|
buttonImage: "images/calendar.gif"
|
||||||
|
} ),
|
||||||
|
dp = $( "#ui-datepicker-div" );
|
||||||
|
|
||||||
function step3() {
|
assert.ok( !dp.is( ":visible" ), "Both - initially hidden" );
|
||||||
var inp = testHelper.initNewInput( {
|
button = inp.siblings( "button" );
|
||||||
showOn: "button",
|
assert.ok( button.length === 1, "Both - button present" );
|
||||||
buttonImageOnly: true,
|
image = inp.siblings( "img" );
|
||||||
buttonImage: "images/calendar.gif",
|
assert.ok( image.length === 0, "Both - image absent" );
|
||||||
buttonText: "Cal"
|
image = button.children( "img" );
|
||||||
} ),
|
assert.ok( image.length === 1, "Both - button image present" );
|
||||||
dp = $( "#ui-datepicker-div" );
|
|
||||||
|
|
||||||
assert.ok( !dp.is( ":visible" ), "Image button - initially hidden" );
|
testHelper.onFocus( inp, function() {
|
||||||
button = inp.siblings( "button" );
|
assert.ok( dp.is( ":visible" ), "Both - rendered on focus" );
|
||||||
assert.ok( button.length === 0, "Image button - button absent" );
|
body.simulate( "mousedown", {} );
|
||||||
image = inp.siblings( "img" );
|
assert.ok( !dp.is( ":visible" ), "Both - hidden on external click" );
|
||||||
assert.ok( image.length === 1, "Image button - image present" );
|
button.trigger( "click" );
|
||||||
assert.ok( /images\/calendar\.gif$/.test( image.attr( "src" ) ), "Image button - image source" );
|
assert.ok( dp.is( ":visible" ), "Both - rendered on button click" );
|
||||||
assert.equal( image.attr( "title" ), "Cal", "Image button - image text" );
|
button.trigger( "click" );
|
||||||
|
assert.ok( !dp.is( ":visible" ), "Both - hidden on second button click" );
|
||||||
|
inp.datepicker( "hide" ).datepicker( "destroy" );
|
||||||
|
|
||||||
testHelper.onFocus( inp, function() {
|
ready();
|
||||||
assert.ok( !dp.is( ":visible" ), "Image button - not rendered on focus" );
|
} );
|
||||||
image.trigger( "click" );
|
}
|
||||||
assert.ok( dp.is( ":visible" ), "Image button - rendered on image click" );
|
|
||||||
image.trigger( "click" );
|
|
||||||
assert.ok( !dp.is( ":visible" ), "Image button - hidden on second image click" );
|
|
||||||
inp.datepicker( "hide" ).datepicker( "destroy" );
|
|
||||||
|
|
||||||
step4();
|
step0();
|
||||||
} );
|
} );
|
||||||
}
|
|
||||||
|
|
||||||
function step4() {
|
|
||||||
var inp = testHelper.initNewInput( {
|
|
||||||
showOn: "both",
|
|
||||||
buttonImage: "images/calendar.gif"
|
|
||||||
} ),
|
|
||||||
dp = $( "#ui-datepicker-div" );
|
|
||||||
|
|
||||||
assert.ok( !dp.is( ":visible" ), "Both - initially hidden" );
|
|
||||||
button = inp.siblings( "button" );
|
|
||||||
assert.ok( button.length === 1, "Both - button present" );
|
|
||||||
image = inp.siblings( "img" );
|
|
||||||
assert.ok( image.length === 0, "Both - image absent" );
|
|
||||||
image = button.children( "img" );
|
|
||||||
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() {
|
|
||||||
assert.ok( dp.is( ":visible" ), "Both - rendered on focus" );
|
|
||||||
body.simulate( "mousedown", {} );
|
|
||||||
assert.ok( !dp.is( ":visible" ), "Both - hidden on external click" );
|
|
||||||
button.trigger( "click" );
|
|
||||||
assert.ok( dp.is( ":visible" ), "Both - rendered on button click" );
|
|
||||||
button.trigger( "click" );
|
|
||||||
assert.ok( !dp.is( ":visible" ), "Both - hidden on second button click" );
|
|
||||||
inp.datepicker( "hide" ).datepicker( "destroy" );
|
|
||||||
|
|
||||||
ready();
|
|
||||||
} );
|
|
||||||
} else {
|
|
||||||
ready();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
step0();
|
|
||||||
} );
|
|
||||||
} )();
|
|
||||||
|
|
||||||
QUnit.test( "otherMonths", function( assert ) {
|
QUnit.test( "otherMonths", function( assert ) {
|
||||||
assert.expect( 8 );
|
assert.expect( 8 );
|
||||||
|
@ -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+
|
element.dialog( "instance" )._focusTabbable();
|
||||||
// In IE in jQuery 3.4+ a sequence:
|
setTimeout( function() {
|
||||||
// $( inputNode ).trigger( "focus" ).trigger( "blur" ).trigger( "focus" )
|
assert.equal( document.activeElement, input[ 0 ],
|
||||||
// doesn't end up with a focused input. See:
|
"1. an element that was focused previously." );
|
||||||
// https://github.com/jquery/jquery/issues/4856
|
done();
|
||||||
// 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();
|
|
||||||
setTimeout( function() {
|
|
||||||
assert.equal( document.activeElement, input[ 0 ],
|
|
||||||
"1. an element that was focused previously." );
|
|
||||||
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() {
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -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 ) {
|
||||||
blurCalledCount++;
|
if ( eventName === "blur" ) {
|
||||||
|
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,27 +395,21 @@ 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.
|
assert.expect( 1 );
|
||||||
// We skip this test since it would be impossible for it to pass in such an environment.
|
var element = $( "#draggable1" ).draggable();
|
||||||
QUnit[ document.documentMode === 8 ? "skip" : "test" ](
|
|
||||||
"does not stop propagation to window",
|
|
||||||
function( assert ) {
|
|
||||||
assert.expect( 1 );
|
|
||||||
var element = $( "#draggable1" ).draggable();
|
|
||||||
|
|
||||||
var handler = function() {
|
var handler = function() {
|
||||||
assert.ok( true, "mouseup propagates to window" );
|
assert.ok( true, "mouseup propagates to window" );
|
||||||
};
|
};
|
||||||
$( window ).on( "mouseup", handler );
|
$( window ).on( "mouseup", handler );
|
||||||
|
|
||||||
element.simulate( "drag", {
|
element.simulate( "drag", {
|
||||||
dx: 10,
|
dx: 10,
|
||||||
dy: 10
|
dy: 10
|
||||||
} );
|
} );
|
||||||
|
|
||||||
$( window ).off( "mouseup", handler );
|
$( window ).off( "mouseup", handler );
|
||||||
}
|
} );
|
||||||
);
|
|
||||||
|
|
||||||
} );
|
} );
|
||||||
|
@ -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 + "." : "";
|
||||||
|
|
||||||
|
@ -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", {
|
||||||
|
@ -54,17 +54,11 @@ 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 ) {
|
||||||
|
assert.equal( event.type, "menublur", "blur event.type is 'menublur'" );
|
||||||
// Ignore duplicate blur event fired by IE
|
assert.strictEqual( ui.item[ 0 ], element.children()[ index ], "ui.item" );
|
||||||
if ( !blurHandled ) {
|
|
||||||
blurHandled = true;
|
|
||||||
assert.equal( event.type, "menublur", "blur event.type is 'menublur'" );
|
|
||||||
assert.strictEqual( ui.item[ 0 ], element.children()[ index ], "ui.item" );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
@ -80,17 +74,11 @@ 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 ) {
|
||||||
|
assert.equal( event.type, "menublur", "blur event.type is 'menublur'" );
|
||||||
// Ignore duplicate blur event fired by IE
|
assert.strictEqual( ui.item[ 0 ], element.children()[ index ], "ui.item" );
|
||||||
if ( !blurHandled ) {
|
|
||||||
blurHandled = true;
|
|
||||||
assert.equal( event.type, "menublur", "blur event.type is 'menublur'" );
|
|
||||||
assert.strictEqual( ui.item[ 0 ], element.children()[ index ], "ui.item" );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
@ -294,17 +294,8 @@ QUnit.test( "{ forcePlaceholderSize: true } table rows", function( assert ) {
|
|||||||
placeholder: "test",
|
placeholder: "test",
|
||||||
forcePlaceholderSize: true,
|
forcePlaceholderSize: true,
|
||||||
start: function( event, ui ) {
|
start: function( event, ui ) {
|
||||||
|
assert.equal( ui.placeholder.height(), ui.item.height(),
|
||||||
// Support: IE 11+, Edge <79 only
|
"placeholder is same height as item" );
|
||||||
// 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(),
|
|
||||||
"placeholder is same height as item" );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
@ -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 {
|
||||||
|
@ -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;
|
||||||
|
@ -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 {
|
||||||
|
@ -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 {
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
@ -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,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");
|
||||||
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 {
|
||||||
|
@ -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,
|
||||||
|
@ -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 {
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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}*/;
|
||||||
}
|
}
|
||||||
|
@ -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",
|
||||||
|
24
ui/effect.js
24
ui/effect.js
@ -81,26 +81,14 @@ 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 ];
|
if ( typeof style[ key ] === "string" ) {
|
||||||
if ( typeof style[ key ] === "string" ) {
|
styles[ camelCase( key ) ] = style[ key ];
|
||||||
styles[ camelCase( key ) ] = style[ key ];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Support: Opera, IE <9
|
|
||||||
} else {
|
|
||||||
for ( key in style ) {
|
|
||||||
if ( typeof style[ key ] === "string" ) {
|
|
||||||
styles[ key ] = style[ key ];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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 );
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
23
ui/form.js
23
ui/form.js
@ -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 );
|
|
||||||
};
|
|
||||||
|
|
||||||
} );
|
|
18
ui/ie.js
18
ui/ie.js
@ -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() );
|
|
||||||
} );
|
|
@ -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
|
||||||
|
@ -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;
|
|
||||||
};
|
|
||||||
|
|
||||||
} );
|
|
@ -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" );
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
} );
|
|
@ -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 );
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
@ -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";
|
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
@ -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 {
|
||||||
|
@ -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;
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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(),
|
||||||
|
@ -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 ) {
|
||||||
|
@ -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 );
|
||||||
|
@ -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,28 +138,17 @@ 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
|
// Support: Safari <=8 - 9
|
||||||
if ( $.ui.ie && ( !document.documentMode || document.documentMode < 9 ) &&
|
// Safari sets which to 0 if you press any of the following keys
|
||||||
!event.button ) {
|
// during a drag (#14461)
|
||||||
|
if ( event.originalEvent.altKey || event.originalEvent.ctrlKey ||
|
||||||
|
event.originalEvent.metaKey || event.originalEvent.shiftKey ) {
|
||||||
|
this.ignoreMissingWhich = true;
|
||||||
|
} else if ( !this.ignoreMissingWhich ) {
|
||||||
return this._mouseUp( event );
|
return this._mouseUp( event );
|
||||||
|
|
||||||
// Iframe mouseup check - mouseup occurred in another document
|
|
||||||
} else if ( !event.which ) {
|
|
||||||
|
|
||||||
// Support: Safari <=8 - 9
|
|
||||||
// Safari sets which to 0 if you press any of the following keys
|
|
||||||
// during a drag (#14461)
|
|
||||||
if ( event.originalEvent.altKey || event.originalEvent.ctrlKey ||
|
|
||||||
event.originalEvent.metaKey || event.originalEvent.shiftKey ) {
|
|
||||||
this.ignoreMissingWhich = true;
|
|
||||||
} else if ( !this.ignoreMissingWhich ) {
|
|
||||||
return this._mouseUp( event );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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,17 +425,9 @@ 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 ( selection.rangeCount ) {
|
||||||
if ( window.getSelection ) {
|
this.range = selection.getRangeAt( 0 );
|
||||||
selection = window.getSelection();
|
|
||||||
if ( selection.rangeCount ) {
|
|
||||||
this.range = selection.getRangeAt( 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Support: IE8
|
|
||||||
} else {
|
|
||||||
this.range = document.selection.createRange();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -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
|
|
||||||
) );
|
) );
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -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 ) {
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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 ) );
|
||||||
|
@ -227,25 +227,20 @@ $.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
|
// Ignore async response if tooltip was closed already
|
||||||
// delay this call to _open so the other call to _open runs first
|
if ( !target.data( "ui-tooltip-open" ) ) {
|
||||||
that._delay( function() {
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Ignore async response if tooltip was closed already
|
// JQuery creates a special event for focusin when it doesn't
|
||||||
if ( !target.data( "ui-tooltip-open" ) ) {
|
// exist natively. To improve performance, the native event
|
||||||
return;
|
// object is reused and the type is changed. Therefore, we can't
|
||||||
}
|
// rely on the type being correct after the event finished
|
||||||
|
// bubbling, so we set it back to the previous value. (#8740)
|
||||||
// JQuery creates a special event for focusin when it doesn't
|
if ( event ) {
|
||||||
// exist natively. To improve performance, the native event
|
event.type = eventType;
|
||||||
// object is reused and the type is changed. Therefore, we can't
|
}
|
||||||
// rely on the type being correct after the event finished
|
that._open( event, target, response );
|
||||||
// bubbling, so we set it back to the previous value. (#8740)
|
|
||||||
if ( event ) {
|
|
||||||
event.type = eventType;
|
|
||||||
}
|
|
||||||
this._open( event, target, response );
|
|
||||||
} );
|
|
||||||
} );
|
} );
|
||||||
if ( content ) {
|
if ( content ) {
|
||||||
this._open( event, target, content );
|
this._open( event, target, content );
|
||||||
|
Loading…
Reference in New Issue
Block a user