]> source.dussan.org Git - jquery-ui.git/log
jquery-ui.git
2 years agoBuild: Update Grunt to resolve CVE-2022-1537
Michał Gołębiowski-Owczarek [Wed, 22 Jun 2022 10:58:05 +0000 (12:58 +0200)]
Build: Update Grunt to resolve CVE-2022-1537

More details:
https://github.com/advisories/GHSA-rm36-94g8-835r

Fixes gh-2090
Closes gh-2091

2 years agoBuild: Include all the files published to the CDN in npm/Bower packages
Michał Gołębiowski-Owczarek [Wed, 23 Mar 2022 11:05:10 +0000 (12:05 +0100)]
Build: Include all the files published to the CDN in npm/Bower packages

Both unminified & minified versions of JS & CSS files are included, for all
themes, as well as images.

Fixes gh-2011
Closes gh-2059

2 years agoBuild: Updating the main version to 1.13.2-pre.
Michał Gołębiowski-Owczarek [Thu, 20 Jan 2022 13:04:17 +0000 (14:04 +0100)]
Build: Updating the main version to 1.13.2-pre.

2 years agoBuild: Update some npm dependencies
Michał Gołębiowski-Owczarek [Thu, 20 Jan 2022 12:29:50 +0000 (13:29 +0100)]
Build: Update some npm dependencies

Unfortunately, we cannot update all of them to their latest versions as some
of them now require Node.js 12 and we need to be able to build on Node 10 as
that's what our Jenkins runs.

2 years agoWidget: Optimize attachment of the _untrackClassesElement listener
Michał Gołębiowski-Owczarek [Sat, 15 Jan 2022 00:26:23 +0000 (01:26 +0100)]
Widget: Optimize attachment of the _untrackClassesElement listener

jQuery UI 1.13.0 changed the logic attaching the `_untrackClassesElement`
listener in the `_classes` widget method; one of the side effects was calling
`this._on` for each node that needed the listener. That caused a severe
performance degradation for large comboboxes as each `_on` jQuery UI call
causes a jQuery `add` call that calls Sizzle's `uniqueSort` underneath.

Instead, collect the nodes that need the listener and then, outside of the loop,
create a jQuery object out of them and attach the listener once. That's still
slower than the jQuery 1.12 version but only slightly: 936 ms to 1.03s on a very
large list on a recent MacBook Pro, compared to ~30 seconds before this patch.

Fixes gh-2014
Closes gh-2037

2 years agoBuild: Add Felix to .mailmap, update AUTHORS.txt
Michał Gołębiowski-Owczarek [Sat, 15 Jan 2022 00:26:00 +0000 (01:26 +0100)]
Build: Add Felix to .mailmap, update AUTHORS.txt

Beyond the `AUTHORS.txt` changes, this accounts for a recent email change in
one of the commits.

Closes gh-2039

2 years agoAutocomplete: Rewrite with a delay instead of appending the live region
Ben Mullins [Wed, 5 Jan 2022 10:35:34 +0000 (05:35 -0500)]
Autocomplete: Rewrite with a delay instead of appending the live region

This fixes the issue caused by https://bugs.jqueryui.com/ticket/9357.
We now empty the live region instead of appending to it, and we do so
after a brief timeout so the live region isn't updated on every mousemove
event or when quickly traversing through options.

Fixes gh-2002
Closes gh-2031

2 years agoBuild: Add extra Github action job for PR required checks configuration
Felix Nagel [Fri, 3 Dec 2021 18:27:15 +0000 (19:27 +0100)]
Build: Add extra Github action job for PR required checks configuration

2 years agoBuild: Switch from Travis to GitHub actions
Felix Nagel [Tue, 30 Nov 2021 15:47:11 +0000 (16:47 +0100)]
Build: Switch from Travis to GitHub actions

Closes gh-2021

3 years agoWidget: Make contextless widget construction work
Michał Gołębiowski-Owczarek [Thu, 18 Nov 2021 23:47:56 +0000 (00:47 +0100)]
Widget: Make contextless widget construction work

Due to the fact the widget factory code is now in strict mode, the check for
being called without using the `new` keyword started breaking if you save the
widget constructor to a variable before calling it:
```js
var customWidget = $.custom.customWidget;
customWidget( {}, elem );
```
as then `this` is undefined and checking for `this._createWidget` crashes.
Account for that with an additional check.

Fixes gh-2015
Closes gh-2019

3 years agoSortable: Fix positioning when moving a Draggable item into a Sortable
Michał Gołębiowski-Owczarek [Mon, 15 Nov 2021 17:39:25 +0000 (18:39 +0100)]
Sortable: Fix positioning when moving a Draggable item into a Sortable

PR gh-1793 removed setting `this.offset.parent` in the Draggable
`refreshPositions` method which broke position calculations when moving
a Draggable item into a connected Sortable. restore that assignment.

Ref gh-1793
Fixes gh-2001
Closes gh-2009

3 years agoSortable: Allow 0-height containers to be sortable as in 1.12.1
Michał Gołębiowski-Owczarek [Mon, 8 Nov 2021 17:21:03 +0000 (18:21 +0100)]
Sortable: Allow 0-height containers to be sortable as in 1.12.1

Note that container specific events will not fire when the dragged element
is interacting with zero height containers.

Fixes gh-1998
Closes gh-2008

Co-authored-by: A. Wells <borgboyone@users.noreply.github.com>
3 years agoTooltip: Don't crash on empty content
Josep Sanz [Mon, 8 Nov 2021 10:53:45 +0000 (11:53 +0100)]
Tooltip: Don't crash on empty content

Commit 1f2011ece removed a `try-catch` around triggering the `remove` handlers
in the `jQuery.cleanData` override. The `try-catch` was meant for old IE but it was
also catching an error coming from the tooltip `remove` handler depending on
being able to find a relevant tooltip. The `_find` method returns `null`, though,
when the tooltip cotent is empty.

Instead of restoring the `try-catch`, handle the `null` case in the `remove` handler.

Fixes gh-1990
Closes gh-1994

Co-authored-by: Claas Augner <github@caugner.de>
Co-authored-by: Michał Gołębiowski-Owczarek <m.goleb@gmail.com>
3 years agoDocs: Update the bug tracker from bugs.jqueryui.com to GitHub
Michał Gołębiowski-Owczarek [Thu, 7 Oct 2021 14:48:39 +0000 (16:48 +0200)]
Docs: Update the bug tracker from bugs.jqueryui.com to GitHub

Also, remove the Weekly Meetings section from README as the meetings are no
longer happening.

Closes gh-1972

3 years agoBuild: Updating the main version to 1.13.1-pre.
Michał Gołębiowski-Owczarek [Thu, 7 Oct 2021 14:21:24 +0000 (16:21 +0200)]
Build: Updating the main version to 1.13.1-pre.

3 years agoTests: Take development jQuery versions from releases.jquery.com
Michał Gołębiowski-Owczarek [Wed, 29 Sep 2021 17:07:43 +0000 (19:07 +0200)]
Tests: Take development jQuery versions from releases.jquery.com

code.jquery.com is now used just for the specific versions.

3 years agoTests: Load the TestSwarm listener via HTTPS
Michał Gołębiowski-Owczarek [Wed, 29 Sep 2021 15:22:17 +0000 (17:22 +0200)]
Tests: Load the TestSwarm listener via HTTPS

3 years agoRelease: Update the download.jqueryui.com dependency
Michał Gołębiowski-Owczarek [Mon, 27 Sep 2021 13:13:30 +0000 (15:13 +0200)]
Release: Update the download.jqueryui.com dependency

3 years agoTheme: Revert three theme commits that are causing styling issues (#1983)
Michał Gołębiowski-Owczarek [Sat, 25 Sep 2021 22:03:44 +0000 (00:03 +0200)]
Theme: Revert three theme commits that are causing styling issues (#1983)

* Revert "Theme: Removes css for ui-state-checked its not used any more"

This reverts commit 1b0e947f46bc1261b15816f2dcbd239d83a86335.

* Revert "Theme: Replace missing definition for default icons"

This reverts commit dde9b83df61d1d676e66cb2a2f7970dd44a05137.

* Revert "Theme: Switch icon background to use bgColorContent"

This reverts commit 265b8f5e533923b9b4c9cbd9f1dd7b7785423381.

This reverts three commits:

* Theme: Removes css for ui-state-checked its not used any more https://github.com/jquery/jquery-ui/commit/1b0e947f46bc1261b15816f2dcbd239d83a86335 (https://github.com/jquery/jquery-ui/pull/1753)
* Theme: Replace missing definition for default icons https://github.com/jquery/jquery-ui/commit/dde9b83df61d1d676e66cb2a2f7970dd44a05137
* Theme: Switch icon background to use bgColorContent https://github.com/jquery/jquery-ui/commit/265b8f5e533923b9b4c9cbd9f1dd7b7785423381

which caused styling issues when compared to UI 1.12.1.

This unfixes a few issues:

* https://github.com/jquery/download.jqueryui.com/issues/335
* https://bugs.jqueryui.com/ticket/15059
* https://forum.jquery.com/topic/checkboxradio-widget-checkbox-click-doesn-t-work-with-ui-lightness-theme-22-9-2016

However, old & known issues are better than new & unknown ones, especially with our current very limited resources.

Closes gh-1983

3 years agoTheme: Fix blank icons having a background
Michał Gołębiowski-Owczarek [Sat, 25 Sep 2021 19:20:06 +0000 (21:20 +0200)]
Theme: Fix blank icons having a background

A fix from 43254468de7d69b5422e667ba7ebbe864fc34a63 introduced a rule setting
`background-image` of a blank icon to none. However, the selector used for that
rule had lower specificity than another one: `.ui-button .ui-icon` which caused
dashes being shown over the icons.

We needed to increase the specificity of the `.ui-icon-blank` rule past the
above selector and past `.ui-button:hover .ui-icon`. We're doing it by repeating
the class name three times.

Closes gh-1987

3 years agoBuild: Require jQuery `>=1.8.0 <4.0.0`, not `>=1.6` in bower.json
Michał Gołębiowski-Owczarek [Fri, 24 Sep 2021 17:01:05 +0000 (19:01 +0200)]
Build: Require jQuery `>=1.8.0 <4.0.0`, not `>=1.6` in bower.json

3 years agoDocs: Update jQuery used for demos to 3.6.0
Michał Gołębiowski-Owczarek [Fri, 24 Sep 2021 17:02:05 +0000 (19:02 +0200)]
Docs: Update jQuery used for demos to 3.6.0

jQuery 1.12.4 misses some Core APIs that jQuery UI depends on and that are not
polyfilled in demos.

3 years agoTests: Update the default jQuery version from 1.12.4 to 3.6.0
Michał Gołębiowski-Owczarek [Fri, 30 Jul 2021 10:45:16 +0000 (12:45 +0200)]
Tests: Update the default jQuery version from 1.12.4 to 3.6.0

3 years agoEffect: Define the jQuery variable before jQuery Color gets imported
Michał Gołębiowski-Owczarek [Fri, 3 Sep 2021 12:42:30 +0000 (14:42 +0200)]
Effect: Define the jQuery variable before jQuery Color gets imported

We need to create a local jQuery because jQuery Color relies on it and the
global may not exist with AMD and a custom build (trac-10199). This worked
in UI 1.12 but stopped in 1.13 as jQuery Color is now sourced as an AMD module
and the variable started being defined after jQuery Color code. To restore the
proper order, move the variable declaration to a separate small module loaded
before jQuery Color.

Closes gh-1973

3 years agoRelease: Update the download.jqueryui.com dependency
Michał Gołębiowski-Owczarek [Thu, 2 Sep 2021 15:17:50 +0000 (17:17 +0200)]
Release: Update the download.jqueryui.com dependency

The latest version contains small tweaks to the "use strict" pragma placement.

3 years agoBuild: Update npm dependencies
Michał Gołębiowski-Owczarek [Thu, 2 Sep 2021 14:05:31 +0000 (16:05 +0200)]
Build: Update npm dependencies

3 years agoRelease: Update the download.jqueryui.com dependency
Michał Gołębiowski-Owczarek [Thu, 26 Aug 2021 11:41:10 +0000 (13:41 +0200)]
Release: Update the download.jqueryui.com dependency

This is needed to make `"use strict"` pragmas not stripped out during the
build.

Closes gh-1969

3 years agoDocs: Update removal comments to mention 1.14, not 1.13
Michał Gołębiowski-Owczarek [Thu, 26 Aug 2021 11:36:06 +0000 (13:36 +0200)]
Docs: Update removal comments to mention 1.14, not 1.13

We're not removing any deprecated API or legacy browser support in 1.13,
re-target comments to mention 1.14.

It's not guaranteed 1.14 will ever get released but if it will, it sounds like
a good moment to do those removals.

Closes gh-1970

3 years agoRelease: Update the download.jqueryui.com dependency
Michał Gołębiowski-Owczarek [Fri, 6 Aug 2021 14:56:51 +0000 (16:56 +0200)]
Release: Update the download.jqueryui.com dependency

3 years agoRelease: Abort on packager errors
Michał Gołębiowski-Owczarek [Fri, 6 Aug 2021 13:07:00 +0000 (15:07 +0200)]
Release: Abort on packager errors

3 years agoRelease: Update dependencies for the 1.13 release
Michał Gołębiowski-Owczarek [Thu, 5 Aug 2021 14:18:48 +0000 (16:18 +0200)]
Release: Update dependencies for the 1.13 release

Closes gh-1966

3 years agoBuild: Don't save temporary npm dependencies to package.json
Michał Gołębiowski-Owczarek [Thu, 5 Aug 2021 11:06:18 +0000 (13:06 +0200)]
Build: Don't save temporary npm dependencies to package.json

Past npm versions required the `--save` flag to save anything in `package.json`
when installing packages but newer ones do this by default. Pass `--no-save` to
restore the original behavior in the `release-test.js` script.

Ref gh-1966

3 years agoBuild: Don't publish dist/cdn to npm
Michał Gołębiowski-Owczarek [Wed, 4 Aug 2021 20:57:11 +0000 (22:57 +0200)]
Build: Don't publish dist/cdn to npm

3 years agoBuild: Update dependencies passed to jquery-release
Michał Gołębiowski-Owczarek [Wed, 4 Aug 2021 16:03:46 +0000 (18:03 +0200)]
Build: Update dependencies passed to jquery-release

The older versions were not compatible with Node.js 10 & newer.

Closes gh-1963

3 years agoDocs: Update AUTHORS.txt
Michał Gołębiowski-Owczarek [Wed, 4 Aug 2021 15:39:54 +0000 (17:39 +0200)]
Docs: Update AUTHORS.txt

Closes gh-1964

3 years agoBuild: Fix package generation
Michał Gołębiowski-Owczarek [Wed, 4 Aug 2021 15:29:48 +0000 (17:29 +0200)]
Build: Fix package generation

jQuery UI 1.12.1 was released using an outdated (at the time of its release)
version of the download.jqueryui.com package; the latest ones wouldn't generate
relevant JS files.

This commit accounts for the changes so that the latest version can be used.

Closes gh-1965

3 years agoDatepicker: Get selectedDay from data-date instead of element contents
c-lambert [Mon, 12 Jul 2021 07:41:41 +0000 (09:41 +0200)]
Datepicker: Get selectedDay from data-date instead of element contents

This makes datepicker work fine even if translation software modifies texts on the page.

Closes gh-1943

3 years agoBuild: Migrate from JSHint & JSCS to ESLint
Michał Gołębiowski-Owczarek [Sun, 6 Jun 2021 22:58:12 +0000 (00:58 +0200)]
Build: Migrate from JSHint & JSCS to ESLint

Fixes #15393
Closes gh-1958

3 years agoDatepicker: Improve callbacks test for onUpdateDatepicker
Patrick McKay [Sun, 1 Mar 2020 14:09:21 +0000 (08:09 -0600)]
Datepicker: Improve callbacks test for onUpdateDatepicker

Make sure the custom element added by the onUpdateDatepicker callback still exists and is not duplicated after calling refresh and setDate.

3 years agoDatepicker: Add option for onUpdateDatepicker callback
Patrick McKay [Sun, 1 Mar 2020 13:13:05 +0000 (07:13 -0600)]
Datepicker: Add option for onUpdateDatepicker callback

Add a new option named onUpdateDatepicker that allows a custom callback
to be provided. If provided, the callback is called at the end of
$.datepicker._updateDatepicker.

3 years agoFix: Adapt datpicker.js for a11y
Mikolaj Wolicki [Sat, 14 Dec 2019 10:34:29 +0000 (11:34 +0100)]
Fix: Adapt datpicker.js for a11y

3 years agoAll: Drop $.ui.escapeSelector in favor of $.escapeSelector
Michał Gołębiowski-Owczarek [Fri, 14 May 2021 21:37:19 +0000 (23:37 +0200)]
All: Drop $.ui.escapeSelector in favor of $.escapeSelector

Fixes #14991
Closes gh-1957

3 years agoDatepicker: Make sure text option are text, shorten HTML strings
Michał Gołębiowski-Owczarek [Tue, 11 May 2021 22:59:42 +0000 (00:59 +0200)]
Datepicker: Make sure text option are text, shorten HTML strings

Instead of using enormous HTML strings, various elements are now constructed
using jQuery APIs. This makes it more obvious user-provided data is used
correctly.

Fixes #15284
Closes gh-1953

3 years agoPosition: Make sure `of` is treated as a CSS selector
Michał Gołębiowski-Owczarek [Tue, 4 May 2021 11:31:39 +0000 (13:31 +0200)]
Position: Make sure `of` is treated as a CSS selector

Closes gh-1955

3 years agoDatepicker: Make sure altField is treated as a CSS selector
Michał Gołębiowski-Owczarek [Tue, 4 May 2021 11:30:06 +0000 (13:30 +0200)]
Datepicker: Make sure altField is treated as a CSS selector

Closes gh-1954

3 years agoTests: Accept delayed focusout in IE with jQuery 1.8
Michał Gołębiowski-Owczarek [Fri, 16 Apr 2021 21:33:57 +0000 (23:33 +0200)]
Tests: Accept delayed focusout in IE with jQuery 1.8

In IE with jQuery 1.8 focusout may not happen immediately so some checks
need to be done later.

Closes gh-1952

3 years agoTests: Fix the "dialog: core: focus tabbable" test in IE
Michał Gołębiowski-Owczarek [Tue, 16 Mar 2021 21:17:25 +0000 (22:17 +0100)]
Tests: Fix the "dialog: core: focus tabbable" test in IE

In IE in jQuery 3.4+ a sequence:
```js
$( inputNode ).trigger( "focus" ).trigger( "blur" ).trigger( "focus" );
```
doesn't end up with a focused input. 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.

Ref jquery/jquery#4856
Closes gh-1951

3 years agoBuild: Fix the new htmllint error regex
Michał Gołębiowski-Owczarek [Wed, 10 Mar 2021 10:50:52 +0000 (11:50 +0100)]
Build: Fix the new htmllint error regex

Some bad pages are being detected as Catalan randomly which makes the build
fail. This is reproducible both locally & on Travis. PR gh-1949 added a new
regex to account for this error but it didn't escape parens properly so it's
not matching the problematic error message.

Ref gh-1949
Closes gh-1950

3 years agoTests: Make some number comparisons less strict
Michał Gołębiowski-Owczarek [Mon, 8 Mar 2021 23:11:40 +0000 (00:11 +0100)]
Tests: Make some number comparisons less strict

Some of the APIs return fractional values in newer jQueries, making comparisons
sometimes not being 100% accurate. Allow some delta.

This is similar to what was already done in
98b539171b6e805fa79346a5e9896865e5213b9c but a few cases affecting IE and/or
Edge Legacy were missed.

Closes gh-1947

3 years agoBuild: Add a new htmllint error regex
Michał Gołębiowski-Owczarek [Mon, 8 Mar 2021 23:10:38 +0000 (00:10 +0100)]
Build: Add a new htmllint error regex

Some bad pages are being detected as Catalan randomly which makes the build
fail. This is reproducible both locally & on Travis. This commit adds a new
regex to account for this error.

Closes gh-1949

3 years agoBuild: Add jQuery 3.6.0, update Migrate from 3.3.1 to 3.3.2
Michał Gołębiowski-Owczarek [Mon, 8 Mar 2021 23:09:51 +0000 (00:09 +0100)]
Build: Add jQuery 3.6.0, update Migrate from 3.3.1 to 3.3.2

Closes gh-1948

3 years agoDialog: Workaround broken focus re-triggering in jQuery 3.4/3.5
Michał Gołębiowski-Owczarek [Sun, 21 Feb 2021 23:02:02 +0000 (00:02 +0100)]
Dialog: Workaround broken focus re-triggering in jQuery 3.4/3.5

Focus re-triggering in jQuery 3.4/3.5 makes the original element
have its focus event propagated last, breaking the re-targeting.
Trigger focus in a delay in addition if needed to avoid the issue.

This fixes the "interaction between overlay and other dialogs" core dialog
test when tested against jQuery 3.4/3.5.

Closes gh-1946
Ref jquery/jquery#4382

3 years agoTests: Account for an extra noop focus/blur listener in jQuery >=3.4
Michał Gołębiowski-Owczarek [Sat, 20 Feb 2021 18:11:03 +0000 (19:11 +0100)]
Tests: Account for an extra noop focus/blur listener in jQuery >=3.4

jQuery >=3.4.0 uses a special focus/blur handler pair needed to fix various
issues with checkboxes/radio buttons as well as being able to pass data in focus
triggers. This leaves extra focus & blur events if any of these events were ever
listened to at a particular element.

We've started skipping these handlers in the `domEqual` assertion in gh-1930 but
we missed a case where an event is triggered before any handler is attached -
jQuery >=3.4.0 attaches then an extra noop listener just to force the code path
to go through the setup code before the trigger happens. We now skip this extra
handler as well.

This fixes a test failure in "dialog: methods" destroy tests.

Closes gh-1945
Ref jquery/jquery#4496
Ref gh-1930

3 years agoBuild: Rename the primary branch `master` to `main`
Michał Gołębiowski-Owczarek [Fri, 19 Feb 2021 19:57:54 +0000 (20:57 +0100)]
Build: Rename the primary branch `master` to `main`

Closes gh-1944

4 years agoBuild: Update grunt-contrib-qunit version from 1.0.1 to 4.0.0
sakshi87 [Wed, 21 Oct 2020 21:43:26 +0000 (03:13 +0530)]
Build: Update grunt-contrib-qunit version from 1.0.1 to 4.0.0

Closes gh-1894

4 years agoCore: Resolve csslint issues with the IE filter property
Michał Gołębiowski-Owczarek [Thu, 15 Oct 2020 12:33:51 +0000 (14:33 +0200)]
Core: Resolve csslint issues with the IE filter property

IE filter property violates standard CSS parsing rules. Because of that, IE 8
added `-ms-filter` which accepts the same values but quoted:
https://web.archive.org/web/20101112132308/http://blogs.msdn.com/b/ie/archive/2008/09/08/microsoft-css-vendor-extensions.aspx
Both `filter` & `-ms-filter` serialize to the same `filter` property in
`currentStyle`.

This commit switches to that new property to resolve csslint issues.

Closes gh-1939

4 years agoBuild: Update to the latest version of Grunt & many other packages
Micah Miller [Wed, 14 Oct 2020 21:54:09 +0000 (17:54 -0400)]
Build: Update to the latest version of Grunt & many other packages

JSHint, JSCS & QUnit-related packages are not updated as they need more code
adjustments.

Fixes #15112
Closes gh-1882

4 years agoFocusable: Fix handling of `visibility: collapse`
Paul Capron [Wed, 14 Oct 2020 21:53:11 +0000 (23:53 +0200)]
Focusable: Fix handling of `visibility: collapse`

"collapse" is similar to "hidden", with a slight difference in the case
of tr/tbody/td/colgroup elements.
See https://www.w3.org/TR/CSS22/visufx.html#visibility
See https://www.w3.org/TR/CSS22/tables.html#dynamic-effects
See https://developer.mozilla.org/en-US/docs/Web/CSS/visibility#Table_example

"visibility: collapse" elements are always not focusable, though.

Commit d3025968f34 introduced a regression by testing with `!== "hidden"`
instead of `=== "visible"`.

Closes gh-1843

4 years agoTravis: Use Node 10, remove obsolete properties
Michał Gołębiowski-Owczarek [Wed, 14 Oct 2020 21:45:19 +0000 (23:45 +0200)]
Travis: Use Node 10, remove obsolete properties

Also, migrate to a Java build as we need JDK 8 and it's easier to
install a specific Node.js version in a Java image than vice-versa.

Closes gh-1938

4 years agoWidget: Fix boolean option when under use strict
Hrvoje Novosel [Wed, 15 Jul 2020 14:10:20 +0000 (16:10 +0200)]
Widget: Fix boolean option when under use strict

Fix for `options === true` when using jQuery UI under `use strict`,
which throws:
```
Uncaught TypeError: Cannot create property 'complete' on boolean 'true'
```
on line:
```js
options.complete = callback;
```

Closes gh-1931

4 years agoBuild: Allow to specify browser sets to TestSwarm tasks
Michał Gołębiowski-Owczarek [Fri, 25 Sep 2020 07:40:33 +0000 (09:40 +0200)]
Build: Allow to specify browser sets to TestSwarm tasks

This will make it easier to e.g. now exclude Edge Legacy when testing against
jQuery 4.x.

Closes gh-1936

4 years agoResizable: Fix CSP violation (style unsafe-inline)
Jérémy Munsch [Fri, 19 Jun 2020 06:45:00 +0000 (08:45 +0200)]
Resizable: Fix CSP violation (style unsafe-inline)

4 years agoPackage: Remove Scott González from maintainers
Felix Nagel [Thu, 23 Jul 2020 20:44:03 +0000 (22:44 +0200)]
Package: Remove Scott González from maintainers

4 years agoTheme: Don't load the image sprite for 'ui-icon-blank'
Felix Nagel [Thu, 23 Jul 2020 20:43:06 +0000 (22:43 +0200)]
Theme: Don't load the image sprite for 'ui-icon-blank'

4 years agoTests: Update jQuery Migrate from 3.3.0 to 3.3.1
Michał Gołębiowski-Owczarek [Mon, 27 Jul 2020 19:03:48 +0000 (21:03 +0200)]
Tests: Update jQuery Migrate from 3.3.0 to 3.3.1

That upgrade makes UI pass the whole test suite without a single jQuery Migrate
warning. 🎉

Closes gh-1932

4 years agoExternal: Add .npmignore file
Szabolcs Szabolcsi-Toth [Fri, 24 Jul 2020 20:08:07 +0000 (22:08 +0200)]
External: Add .npmignore file

4 years agoAll: Remove a leftover empty file
Michał Gołębiowski-Owczarek [Fri, 24 Jul 2020 11:23:23 +0000 (13:23 +0200)]
All: Remove a leftover empty file

Closes gh-1933

4 years agoMenu: Account for scrollbars in jQuery 3.2
Michał Gołębiowski-Owczarek [Thu, 23 Jul 2020 13:55:18 +0000 (15:55 +0200)]
Menu: Account for scrollbars in jQuery 3.2

jQuery >=3.2 doesn't include scrollbars in `.height()`, this commit switches
it to `.innerHeight()` which does so in jQuery >=3.3. In  jQuery 3.2 it doesn't
either so include scrollbars in innerHeight, add it back.

Using `.innerHeight()` instead of `.height()` should be fine as menu doesn't
define padding styles.

Closes gh-1929

4 years agoTests: Account for extra focus/blur listeners in jQuery >=3.4
Michał Gołębiowski-Owczarek [Thu, 23 Jul 2020 13:54:16 +0000 (15:54 +0200)]
Tests: Account for extra focus/blur listeners in jQuery >=3.4

jQuery >=3.4.0 uses a special focus/blur handler pair
needed to fix various issues with checkboxes/radio buttons
as well as being able to pass data in focus triggers.
However, this leaves dummy focus & blur events if any of these
events were ever listened to at a particular element. There's not
a lot UI can do to fix this so we now just skip these handlers for
data comparisons in tests.

Ref jquery/jquery#4496
Closes gh-1930

Co-authored-by: Richard Gibson <richard.gibson@gmail.com>
4 years agoTests: Accept a small difference of animated width/height
Michał Gołębiowski-Owczarek [Thu, 23 Jul 2020 13:53:36 +0000 (15:53 +0200)]
Tests: Accept a small difference of animated width/height

jQuery 3.2 & newer have a different animation logic and the animated elements
width/height differ from the starting ones even at the beginning of the
animation. The point of the assertions checking that they're identical was
to ensure bug #5245 is fixed; that issue manifested by a big jump to half the
element size. To test for that, it's enough to check that the first obtained
values are close to the original ones.

This makes effects tests pass in all supported jQuery versions.

Closes gh-1928
Ref #5245

4 years agoTests: Skip a scrollbar test in jQuery 3.2
Michał Gołębiowski-Owczarek [Thu, 23 Jul 2020 13:51:15 +0000 (15:51 +0200)]
Tests: Skip a scrollbar test in jQuery 3.2

jQuery 3.2 incorrectly handle scrollbars in WebKit/Blink-based browsers.
This is fixed in version 3.3, see https://github.com/jquery/jquery/issues/3589.
As the data here comes from jQuery directly and the changes to fix it
are non-trivial: https://github.com/jquery/jquery/pull/3656, just accept
that scrollbar data in this jQuery version is inaccurate.

Closes gh-1927
Ref jquery/jquery#3589
Ref jquery/jquery#3656

4 years agoTests: Clear the timers queue in an animateClass test
Michał Gołębiowski-Owczarek [Thu, 23 Jul 2020 13:49:27 +0000 (15:49 +0200)]
Tests: Clear the timers queue in an animateClass test

jQueries older than 1.11 or 2.1 were leaving a timer in the queue which could
then influence other tests.

Closes gh-1926

4 years agoAll: Drop support for jQuery 1.7
Michał Gołębiowski-Owczarek [Wed, 22 Jul 2020 14:04:47 +0000 (16:04 +0200)]
All: Drop support for jQuery 1.7

Closes gh-1923

4 years agoBuild: Update the version from 1.12.2-pre to 1.13.0-pre
Michał Gołębiowski-Owczarek [Wed, 22 Jul 2020 14:03:52 +0000 (16:03 +0200)]
Build: Update the version from 1.12.2-pre to 1.13.0-pre

Closes gh-1921

4 years agoTests: Ensure no timers are running at the end of each test (#1920)
Michał Gołębiowski-Owczarek [Sat, 16 May 2020 07:16:24 +0000 (09:16 +0200)]
Tests: Ensure no timers are running at the end of each test (#1920)

This helps fix issues that make tooltip tests sometimes fail when run against
jQuery 3.2 or newer due to timing differences.

Details:
* Add the `moduleAfterEach` function ensuring no timers are running.
* Attach this function via `common.testWidget`.
* Attach this function to most test suites.
* Add a tooltip test helper cleaning up leftover timers.
* Rename legacy `setup`/`teardown` hooks to `beforeEach`/`afterEach`.

Closes gh-1920

4 years agoAll: Resolve most jQuery Migrate warnings
Michał Gołębiowski-Owczarek [Sat, 16 May 2020 06:36:55 +0000 (08:36 +0200)]
All: Resolve most jQuery Migrate warnings

Closes gh-1919

4 years agoTests: Load jQuery Migrate before UI test files
Michał Gołębiowski-Owczarek [Sat, 16 May 2020 06:30:11 +0000 (08:30 +0200)]
Tests: Load jQuery Migrate before UI test files

This is necessary to catch all possible warnings that the test files
may trigger.

Closes gh-1918

4 years agoBuild: Rename jquery-1-7 to jquery-patch
Michał Gołębiowski-Owczarek [Sat, 16 May 2020 06:29:08 +0000 (08:29 +0200)]
Build: Rename jquery-1-7 to jquery-patch

The file now contains many more than just jQuery 1.7 patches.

Closes gh-1917

4 years agoTests: Solve a frequent race condition in tests in Chrome/Safari
Michał Gołębiowski-Owczarek [Sat, 16 May 2020 06:28:26 +0000 (08:28 +0200)]
Tests: Solve a frequent race condition in tests in Chrome/Safari

Closes gh-1916

4 years agoBuild: Add jQuery 3.5.0 & 3.5.1
Michał Gołębiowski-Owczarek [Sat, 16 May 2020 06:27:27 +0000 (08:27 +0200)]
Build: Add jQuery 3.5.0 & 3.5.1

Closes gh-1915

4 years agoBuild: Update jQuery Simulate, jQuery Migrate & jQuery Color
Michał Gołębiowski-Owczarek [Sat, 16 May 2020 06:26:48 +0000 (08:26 +0200)]
Build: Update jQuery Simulate, jQuery Migrate & jQuery Color

The jQuery Simulate & jQuery Color updates are needed for compatibility
with jQuery master, a future jQuery 4.

Closes gh-1914

4 years agoDatepicker: Fix Hungarian localization to use uppercase for first characters
Fatér Zsolt [Wed, 18 Dec 2019 10:06:23 +0000 (11:06 +0100)]
Datepicker: Fix Hungarian localization to use uppercase for first characters

4 years agoDatepicker: Add German localization
Florian Wegscheider [Fri, 17 Jan 2020 07:09:37 +0000 (08:09 +0100)]
Datepicker: Add German localization

4 years agoDatepicker: Fixed current instance memory leak and added unit testcases
jigar gala [Wed, 31 Jan 2018 19:45:58 +0000 (01:15 +0530)]
Datepicker: Fixed current instance memory leak and added unit testcases

4 years agoAll: Remove usage of jQuery positional selectors
Michał Gołębiowski-Owczarek [Wed, 22 Jan 2020 15:44:34 +0000 (16:44 +0100)]
All: Remove usage of jQuery positional selectors

jQuery positional selectors () have been deprecated in
[jQuery 3.4.0](https://blog.jquery.com/2019/04/10/jquery-3-4-0-released/)
and they'll be removed in jQuery 4.0.0. This PR removes their usage.

Most of the changes were possible without changing public API. However,
dropping `:even` usage required a change to the
[`header` option](https://api.jqueryui.com/accordion/#option-header)
of the accordion widget. I made it an optional function; this will need
to be documented.

The polyfill for `.even()` & `.odd()` is added for jQuery <3.5.0. There was
no usage of the :odd selector in the code but the `.odd()` method is also
polyfilled for completeness.

Closes gh-1904

4 years agoTests: Add the 3.x-git jQuery version to the dropdown
Michał Gołębiowski-Owczarek [Mon, 30 Dec 2019 22:56:30 +0000 (23:56 +0100)]
Tests: Add the 3.x-git jQuery version to the dropdown

Closes gh-1905

4 years agoSortable: Remove reference to .disableSelection() from demos
Gez Quinn [Mon, 9 Dec 2019 20:13:03 +0000 (20:13 +0000)]
Sortable: Remove reference to .disableSelection() from demos

`.disableSelection()` was deprecated in v1.9:
http://api.jqueryui.com/disableSelection/

Closes gh-1856

4 years agoDatepicker: Fix typo in currentText in da localization
OskarNS [Mon, 9 Dec 2019 20:11:13 +0000 (21:11 +0100)]
Datepicker: Fix typo in currentText in da localization

The term for "Today" in Danish is "I dag" not "Idag". This is a common misspelling in the Danish language.
see https://dsn.dk/?retskriv=idag
Dansk Sprognævn (DSN) is the authority over the Danish language.

Closes gh-1862

4 years agoBuild: Add my new name to .mailmap, update it in AUTHORS.txt
Michał Gołębiowski-Owczarek [Sun, 8 Dec 2019 21:36:04 +0000 (22:36 +0100)]
Build: Add my new name to .mailmap, update it in AUTHORS.txt

Closes gh-1837

4 years agoAll: Use expr.pseudos instead of deprecated expr.filters
Maksymenkov Eugene [Sun, 8 Dec 2019 21:27:16 +0000 (23:27 +0200)]
All: Use expr.pseudos instead of deprecated expr.filters

See:
https://github.com/jquery/jquery-migrate/blob/master/warnings.md#jqmigrate-jqueryexprfilters-is-deprecated-use-jqueryexprpseudos

Closes gh-1887

4 years agoAll: Migrate away from deprecated/removed Core APIs
Michał Gołębiowski-Owczarek [Sun, 8 Dec 2019 21:23:08 +0000 (22:23 +0100)]
All: Migrate away from deprecated/removed Core APIs

Summary of the changes:

* Build: Add jQuery 3.2.0-3.4.1 to versions UI can be tested against
* Build: Load jQuery & Migrate via HTTPS
* Build: Add package-lock.json to .gitignore
* Build: Update jQuery Migrate from 3.0.0 to 3.1.0
* Build: Allow to run tests against jQuery 3.x-git
* Build: Fix formatting according to JSCS rules
* Build: Disable JSCS for the inlined jQuery Color
* All: Switch from $.isArray to Array.isArray (jQuery.isArray will be
  removed in jQuery 4.0)
* All: Switch from `$.isFunction( x )` to `typeof x === "function"`
  (jQuery.isFunction will be removed in jQuery 4.0)
* All: Inline jQuery.isWindow as it'll be removed in jQuery 4.0
* Effects: Fix a timing issue in a variable declaration. Previously,
  a jQuery object was created, chained & assigned to a variable that
  was then accessed in a callback used inside of this chained
  definition. Due to a timing difference in when the callback fired for
  the first time in latest jQuery master, it was being called before
  the variable was defined.
* Tests: Make dialog & draggable unit tests less strict (newest jQuery
  returns fractional results in some cases, making comparisons fail when
  there's a tiny difference)
* All: Migrate from $.trim to bare String.prototype.trim (jQuery.trim
  will be deprecated in jQuery 3.5)

Closes gh-1901

7 years agoTests: Load `jquery-1-7` before other modules 1854/head
Scott González [Wed, 31 May 2017 18:09:05 +0000 (14:09 -0400)]
Tests: Load `jquery-1-7` before other modules

7 years agoDatepicker: Fix first day of week for pt-PT locale
Horus68 [Wed, 31 May 2017 14:53:30 +0000 (15:53 +0100)]
Datepicker: Fix first day of week for pt-PT locale

Fixes #15195
Closes gh-1820

7 years agoDialog: Fix shared event handler for modal dialogs
Scott González [Thu, 11 May 2017 17:58:08 +0000 (13:58 -0400)]
Dialog: Fix shared event handler for modal dialogs

The old logic worked when all widgets of the same type used the same
event namespace. However, now that each instance has its own namespace,
we cannot use `_on()` for shared event handlers.

Fixes #15182
Closes gh-1817

7 years agoAll: Remove uses of `jQuery.proxy()`
Scott González [Mon, 8 May 2017 15:52:58 +0000 (11:52 -0400)]
All: Remove uses of `jQuery.proxy()`

Ref #15160
Closes gh-1813

7 years agoAll: Remove uses of `jQuery.camelCase()`
Scott González [Mon, 8 May 2017 14:47:27 +0000 (10:47 -0400)]
All: Remove uses of `jQuery.camelCase()`

Ref #15160
Ref gh-1813

7 years agoTests: Load `jquery-1-7` module for jQuery 2.x as well
Scott González [Mon, 15 May 2017 22:24:19 +0000 (18:24 -0400)]
Tests: Load `jquery-1-7` module for jQuery 2.x as well

7 years agoDemos: Fix a typo with an extra semicolon
Robert Brignull [Sun, 7 May 2017 20:30:16 +0000 (21:30 +0100)]
Demos: Fix a typo with an extra semicolon

Closes gh-1812

7 years agoTests: Load the `jquery-1-7` module for all 1.x versions
Scott González [Wed, 10 May 2017 13:02:53 +0000 (09:02 -0400)]
Tests: Load the `jquery-1-7` module for all 1.x versions

7 years agoPosition: Increase scrollbar test div to handle larger scrollbars
Scott González [Wed, 3 May 2017 17:12:34 +0000 (13:12 -0400)]
Position: Increase scrollbar test div to handle larger scrollbars

Fixes #15106
Closes gh-1811