1
- /*! jQuery UI - v1.13.2 - 2023-02-27
2
- * http ://jqueryui.com
1
+ /*! jQuery UI - v1.14.1 - 2025-01-13
2
+ * https ://jqueryui.com
3
3
* Includes: widget.js, position.js, keycode.js, unique-id.js, widgets/autocomplete.js, widgets/menu.js
4
- * Copyright jQuery Foundation and other contributors; Licensed MIT */
4
+ * Copyright OpenJS Foundation and other contributors; Licensed MIT */
5
5
6
6
( function ( factory ) {
7
7
"use strict" ;
8
-
8
+
9
9
if ( typeof define === "function" && define . amd ) {
10
10
11
11
// AMD. Register as an anonymous module.
20
20
21
21
$ . ui = $ . ui || { } ;
22
22
23
- var version = $ . ui . version = "1.13.2 " ;
23
+ var version = $ . ui . version = "1.14.1 " ;
24
24
25
25
26
26
/*!
27
- * jQuery UI Widget 1.13.2
28
- * http ://jqueryui.com
27
+ * jQuery UI Widget 1.14.1
28
+ * https ://jqueryui.com
29
29
*
30
- * Copyright jQuery Foundation and other contributors
30
+ * Copyright OpenJS Foundation and other contributors
31
31
* Released under the MIT license.
32
- * http ://jquery.org/license
32
+ * https ://jquery.org/license
33
33
*/
34
34
35
35
//>>label: Widget
36
36
//>>group: Core
37
37
//>>description: Provides a factory for creating stateful widgets with a common API.
38
- //>>docs: http ://api.jqueryui.com/jQuery.widget/
39
- //>>demos: http ://jqueryui.com/widget/
38
+ //>>docs: https ://api.jqueryui.com/jQuery.widget/
39
+ //>>demos: https ://jqueryui.com/widget/
40
40
41
41
42
42
var widgetUuid = 0 ;
@@ -67,6 +67,9 @@ $.widget = function( name, base, prototype ) {
67
67
68
68
var namespace = name . split ( "." ) [ 0 ] ;
69
69
name = name . split ( "." ) [ 1 ] ;
70
+ if ( name === "__proto__" || name === "constructor" ) {
71
+ return $ . error ( "Invalid widget name: " + name ) ;
72
+ }
70
73
var fullName = namespace + "-" + name ;
71
74
72
75
if ( ! prototype ) {
@@ -766,21 +769,21 @@ var widget = $.widget;
766
769
767
770
768
771
/*!
769
- * jQuery UI Position 1.13.2
770
- * http ://jqueryui.com
772
+ * jQuery UI Position 1.14.1
773
+ * https ://jqueryui.com
771
774
*
772
- * Copyright jQuery Foundation and other contributors
775
+ * Copyright OpenJS Foundation and other contributors
773
776
* Released under the MIT license.
774
- * http ://jquery.org/license
777
+ * https ://jquery.org/license
775
778
*
776
- * http ://api.jqueryui.com/position/
779
+ * https ://api.jqueryui.com/position/
777
780
*/
778
781
779
782
//>>label: Position
780
783
//>>group: Core
781
784
//>>description: Positions elements relative to other elements.
782
- //>>docs: http ://api.jqueryui.com/position/
783
- //>>demos: http ://jqueryui.com/position/
785
+ //>>docs: https ://api.jqueryui.com/position/
786
+ //>>demos: https ://jqueryui.com/position/
784
787
785
788
786
789
( function ( ) {
@@ -1263,18 +1266,18 @@ var position = $.ui.position;
1263
1266
1264
1267
1265
1268
/*!
1266
- * jQuery UI Keycode 1.13.2
1267
- * http ://jqueryui.com
1269
+ * jQuery UI Keycode 1.14.1
1270
+ * https ://jqueryui.com
1268
1271
*
1269
- * Copyright jQuery Foundation and other contributors
1272
+ * Copyright OpenJS Foundation and other contributors
1270
1273
* Released under the MIT license.
1271
- * http ://jquery.org/license
1274
+ * https ://jquery.org/license
1272
1275
*/
1273
1276
1274
1277
//>>label: Keycode
1275
1278
//>>group: Core
1276
1279
//>>description: Provide keycodes as keynames
1277
- //>>docs: http ://api.jqueryui.com/jQuery.ui.keyCode/
1280
+ //>>docs: https ://api.jqueryui.com/jQuery.ui.keyCode/
1278
1281
1279
1282
1280
1283
var keycode = $ . ui . keyCode = {
@@ -1298,18 +1301,18 @@ var keycode = $.ui.keyCode = {
1298
1301
1299
1302
1300
1303
/*!
1301
- * jQuery UI Unique ID 1.13.2
1302
- * http ://jqueryui.com
1304
+ * jQuery UI Unique ID 1.14.1
1305
+ * https ://jqueryui.com
1303
1306
*
1304
- * Copyright jQuery Foundation and other contributors
1307
+ * Copyright OpenJS Foundation and other contributors
1305
1308
* Released under the MIT license.
1306
- * http ://jquery.org/license
1309
+ * https ://jquery.org/license
1307
1310
*/
1308
1311
1309
1312
//>>label: uniqueId
1310
1313
//>>group: Core
1311
1314
//>>description: Functions to generate and remove uniqueId's
1312
- //>>docs: http ://api.jqueryui.com/uniqueId/
1315
+ //>>docs: https ://api.jqueryui.com/uniqueId/
1313
1316
1314
1317
1315
1318
var uniqueId = $ . fn . extend ( {
@@ -1335,57 +1338,27 @@ var uniqueId = $.fn.extend( {
1335
1338
} ) ;
1336
1339
1337
1340
1338
-
1339
- var safeActiveElement = $ . ui . safeActiveElement = function ( document ) {
1340
- var activeElement ;
1341
-
1342
- // Support: IE 9 only
1343
- // IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe>
1344
- try {
1345
- activeElement = document . activeElement ;
1346
- } catch ( error ) {
1347
- activeElement = document . body ;
1348
- }
1349
-
1350
- // Support: IE 9 - 11 only
1351
- // IE may return null instead of an element
1352
- // Interestingly, this only seems to occur when NOT in an iframe
1353
- if ( ! activeElement ) {
1354
- activeElement = document . body ;
1355
- }
1356
-
1357
- // Support: IE 11 only
1358
- // IE11 returns a seemingly empty object in some cases when accessing
1359
- // document.activeElement from an <iframe>
1360
- if ( ! activeElement . nodeName ) {
1361
- activeElement = document . body ;
1362
- }
1363
-
1364
- return activeElement ;
1365
- } ;
1366
-
1367
-
1368
1341
/*!
1369
- * jQuery UI Menu 1.13.2
1370
- * http ://jqueryui.com
1342
+ * jQuery UI Menu 1.14.1
1343
+ * https ://jqueryui.com
1371
1344
*
1372
- * Copyright jQuery Foundation and other contributors
1345
+ * Copyright OpenJS Foundation and other contributors
1373
1346
* Released under the MIT license.
1374
- * http ://jquery.org/license
1347
+ * https ://jquery.org/license
1375
1348
*/
1376
1349
1377
1350
//>>label: Menu
1378
1351
//>>group: Widgets
1379
1352
//>>description: Creates nestable menus.
1380
- //>>docs: http ://api.jqueryui.com/menu/
1381
- //>>demos: http ://jqueryui.com/menu/
1353
+ //>>docs: https ://api.jqueryui.com/menu/
1354
+ //>>demos: https ://jqueryui.com/menu/
1382
1355
//>>css.structure: ../../themes/base/core.css
1383
1356
//>>css.structure: ../../themes/base/menu.css
1384
1357
//>>css.theme: ../../themes/base/theme.css
1385
1358
1386
1359
1387
1360
var widgetsMenu = $ . widget ( "ui.menu" , {
1388
- version : "1.13.2 " ,
1361
+ version : "1.14.1 " ,
1389
1362
defaultElement : "<ul>" ,
1390
1363
delay : 300 ,
1391
1364
options : {
@@ -1432,7 +1405,7 @@ var widgetsMenu = $.widget( "ui.menu", {
1432
1405
} ,
1433
1406
"click .ui-menu-item" : function ( event ) {
1434
1407
var target = $ ( event . target ) ;
1435
- var active = $ ( $ . ui . safeActiveElement ( this . document [ 0 ] ) ) ;
1408
+ var active = $ ( this . document [ 0 ] . activeElement ) ;
1436
1409
if ( ! this . mouseHandled && target . not ( ".ui-state-disabled" ) . length ) {
1437
1410
this . select ( event ) ;
1438
1411
@@ -1476,7 +1449,7 @@ var widgetsMenu = $.widget( "ui.menu", {
1476
1449
this . _delay ( function ( ) {
1477
1450
var notContained = ! $ . contains (
1478
1451
this . element [ 0 ] ,
1479
- $ . ui . safeActiveElement ( this . document [ 0 ] )
1452
+ this . document [ 0 ] . activeElement
1480
1453
) ;
1481
1454
if ( notContained ) {
1482
1455
this . collapseAll ( event ) ;
@@ -2057,26 +2030,26 @@ var widgetsMenu = $.widget( "ui.menu", {
2057
2030
2058
2031
2059
2032
/*!
2060
- * jQuery UI Autocomplete 1.13.2
2061
- * http ://jqueryui.com
2033
+ * jQuery UI Autocomplete 1.14.1
2034
+ * https ://jqueryui.com
2062
2035
*
2063
- * Copyright jQuery Foundation and other contributors
2036
+ * Copyright OpenJS Foundation and other contributors
2064
2037
* Released under the MIT license.
2065
- * http ://jquery.org/license
2038
+ * https ://jquery.org/license
2066
2039
*/
2067
2040
2068
2041
//>>label: Autocomplete
2069
2042
//>>group: Widgets
2070
2043
//>>description: Lists suggested words as the user is typing.
2071
- //>>docs: http ://api.jqueryui.com/autocomplete/
2072
- //>>demos: http ://jqueryui.com/autocomplete/
2044
+ //>>docs: https ://api.jqueryui.com/autocomplete/
2045
+ //>>demos: https ://jqueryui.com/autocomplete/
2073
2046
//>>css.structure: ../../themes/base/core.css
2074
2047
//>>css.structure: ../../themes/base/autocomplete.css
2075
2048
//>>css.theme: ../../themes/base/theme.css
2076
2049
2077
2050
2078
2051
$ . widget ( "ui.autocomplete" , {
2079
- version : "1.13.2 " ,
2052
+ version : "1.14.1 " ,
2080
2053
defaultElement : "<input>" ,
2081
2054
options : {
2082
2055
appendTo : null ,
@@ -2120,9 +2093,9 @@ $.widget( "ui.autocomplete", {
2120
2093
2121
2094
// Textareas are always multi-line
2122
2095
// Inputs are always single-line, even if inside a contentEditable element
2123
- // IE also treats inputs as contentEditable
2124
- // All other element types are determined by whether or not they're contentEditable
2125
- this . isMultiLine = isTextarea || ! isInput && this . _isContentEditable ( this . element ) ;
2096
+ // All other element types are determined by whether they're contentEditable
2097
+ this . isMultiLine = isTextarea ||
2098
+ ! isInput && this . element . prop ( "contentEditable" ) === "true" ;
2126
2099
2127
2100
this . valueMethod = this . element [ isTextarea || isInput ? "val" : "text" ] ;
2128
2101
this . isNewMenu = true ;
@@ -2186,7 +2159,6 @@ $.widget( "ui.autocomplete", {
2186
2159
2187
2160
// Different browsers have different default behavior for escape
2188
2161
// Single press can mean undo or clear
2189
- // Double press in IE means clear the whole form
2190
2162
event . preventDefault ( ) ;
2191
2163
}
2192
2164
break ;
@@ -2255,16 +2227,6 @@ $.widget( "ui.autocomplete", {
2255
2227
role : null
2256
2228
} )
2257
2229
. hide ( )
2258
-
2259
- // Support: IE 11 only, Edge <= 14
2260
- // For other browsers, we preventDefault() on the mousedown event
2261
- // to keep the dropdown from taking focus from the input. This doesn't
2262
- // work for IE/Edge, causing problems with selection and scrolling (#9638)
2263
- // Happily, IE and Edge support an "unselectable" attribute that
2264
- // prevents an element from receiving focus, exactly what we want here.
2265
- . attr ( {
2266
- "unselectable" : "on"
2267
- } )
2268
2230
. menu ( "instance" ) ;
2269
2231
2270
2232
this . _addClass ( this . menu . element , "ui-autocomplete" , "ui-front" ) ;
@@ -2277,7 +2239,7 @@ $.widget( "ui.autocomplete", {
2277
2239
menufocus : function ( event , ui ) {
2278
2240
var label , item ;
2279
2241
2280
- // support : Firefox
2242
+ // Support : Firefox
2281
2243
// Prevent accidental activation of menu items in Firefox (#7024 #9118)
2282
2244
if ( this . isNewMenu ) {
2283
2245
this . isNewMenu = false ;
@@ -2315,17 +2277,9 @@ $.widget( "ui.autocomplete", {
2315
2277
previous = this . previous ;
2316
2278
2317
2279
// Only trigger when focus was lost (click on menu)
2318
- if ( this . element [ 0 ] !== $ . ui . safeActiveElement ( this . document [ 0 ] ) ) {
2280
+ if ( this . element [ 0 ] !== this . document [ 0 ] . activeElement ) {
2319
2281
this . element . trigger ( "focus" ) ;
2320
2282
this . previous = previous ;
2321
-
2322
- // #6109 - IE triggers two focus events and the second
2323
- // is asynchronous, so we need to reset the previous
2324
- // term synchronously and asynchronously :-(
2325
- this . _delay ( function ( ) {
2326
- this . previous = previous ;
2327
- this . selectedItem = item ;
2328
- } ) ;
2329
2283
}
2330
2284
2331
2285
if ( false !== this . _trigger ( "select" , event , { item : item } ) ) {
@@ -2644,24 +2598,6 @@ $.widget( "ui.autocomplete", {
2644
2598
// Prevents moving cursor to beginning/end of the text field in some browsers
2645
2599
event . preventDefault ( ) ;
2646
2600
}
2647
- } ,
2648
-
2649
- // Support: Chrome <=50
2650
- // We should be able to just use this.element.prop( "isContentEditable" )
2651
- // but hidden elements always report false in Chrome.
2652
- // https://code.google.com/p/chromium/issues/detail?id=313082
2653
- _isContentEditable : function ( element ) {
2654
- if ( ! element . length ) {
2655
- return false ;
2656
- }
2657
-
2658
- var editable = element . prop ( "contentEditable" ) ;
2659
-
2660
- if ( editable === "inherit" ) {
2661
- return this . _isContentEditable ( element . parent ( ) ) ;
2662
- }
2663
-
2664
- return editable === "true" ;
2665
2601
}
2666
2602
} ) ;
2667
2603
0 commit comments