aboutsummaryrefslogtreecommitdiffstats
path: root/ui/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Dialog: Add aria-modal supportRalf Koller2024-06-141-1/+6
| | | | | | | | | | | | Reflect the `modal` dialog option into the `aria-modal` attribute - when `modal` is `true`, set `aria-modal` to `"true"`. This helps some accessibility tools like VoiceOver with their rotor functionality as it reduces the number of elements presented. Fixes gh-2246 Closes gh-2257 Co-authored-by: Michał Gołębiowski-Owczarek <m.goleb@gmail.com>
* All: Stop relying on jquery-patch.js internally, add testsMichał Gołębiowski-Owczarek2024-05-154-4/+14
| | | | | | | | | | | | Avoid relying on jQuery patches. Instead: * use `CSS.escape` instead of `jQuery.escapeSelector` * use `.filter()` with a proper handler instead of `.even()` Keep `jquery-patch.js` for backwards compatibility, though. Also, add tests for jquery-patch. Ref gh-2249
* Sortable: Rename `storedStylesheet` to `_storedStylesheet`Michał Gołębiowski-Owczarek2024-05-151-3/+4
| | | | | | This follows the naming strategy for other internal properties. Ref gh-2249
* All: Drop support for IE & some other browsers (but mostly IE)Michał Gołębiowski-Owczarek2024-05-1514-221/+60
| | | | Closes gh-2249
* All: Drop support for jQueries different than the latest for each majorMichał Gołębiowski-Owczarek2024-05-153-38/+7
| | | | | | Also, remove the ability to run the test suite in jQuery <1.12.4 & <2.2.4. Closes gh-2249
* Core: Make back compat disabled by defaultMichał Gołębiowski-Owczarek2024-05-137-7/+7
| | | Closes gh-2250
* Docs: Update leftover HTTP Trac URLs to HTTPSMichał Gołębiowski-Owczarek2024-04-261-1/+1
|
* Docs: Change a few most common domains from HTTP to HTTPSMichał Gołębiowski-Owczarek2024-04-2620-82/+82
| | | | | Also, update a few stale URLs to what they redirect now to. Closes gh-2244
* Dialog: Fix IE tests about interactions with other dialogsMichał Gołębiowski-Owczarek2023-05-101-5/+8
| | | | | | | | | | The workaround triggering a second delayed focus to a tabbable element was applied in jQueries 3.4 & 3.5 to fix IE issues. It also needs to be applied in jQuery 3.6 which this commit adds. This will no longer be needed in jQuery 3.7 and jQuery 3.x-git tests are already passing because of that. Closes gh-2160
* Selectmenu: Fix selecting options following hidden onesMichał Gołębiowski-Owczarek2023-05-101-5/+7
| | | | | | | | | | | Change a2b25ef6caae3e1a272214839b815a6387618124 made options with the `hidden` attribute skipped when rendering. However, that makes indexes misaligned with native options as hidden ones maintain their index values. Instead, don't skip hidden options but add the `hidden` attribute to the respective jQuery UI elements as well. Fixes gh-2082 Closes gh-2144 Ref a2b25ef6caae3e1a272214839b815a6387618124
* Resizable: Fix resizing of elems with `box-sizing: border-box`Matías Cánepa2022-10-101-3/+6
| | | | Fixes gh-1979 Closes gh-2012
* All: Update JS Foundation mentions to OpenJS FoundationMichał Gołębiowski-Owczarek2022-07-1920-20/+20
| | | Closes gh-2104
* Checkboxradio: Don't re-evaluate text labels as HTMLMichał Gołębiowski-Owczarek2022-07-141-8/+13
| | | | | | | | | | | | | If you generate a Checkboxradio from a checkbox/radio with a label that contains encoded HTML, e.g. `&lt;em&gt;test&lt;/em&gt;` this will work fine at first. If, however a refresh is triggered on that instance (explicitly or e.g. by turning it into a `Controlgroup`), the previously escaped HTML will now be evaluated. If the label was created based on some user input, this could lead to unexpected code execution even though the initial output was escaped. Fixes gh-2101 Closes gh-2102
* Selectmenu: Remove a call to the deprecated .focus() methodJames Hinderks2022-07-141-1/+1
| | | | | | Replaces a call to the deprecated jQuery `.focus()` method with `.trigger("focus")`. Closes gh-2053
* Autocomplete: Rewrite with a delay instead of appending the live regionBen Mullins2022-01-051-4/+9
| | | | | | | | | 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
* Sortable: Fix positioning when moving a Draggable item into a SortableMichał Gołębiowski-Owczarek2021-11-151-0/+6
| | | | | | | | | 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
* Sortable: Allow 0-height containers to be sortable as in 1.12.1Michał Gołębiowski-Owczarek2021-11-081-64/+57
| | | | | | | | | 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>
* Tooltip: Don't crash on empty contentJosep Sanz2021-11-081-1/+4
| | | | | | | | | | | | | | | 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>
* Docs: Update removal comments to mention 1.14, not 1.13Michał Gołębiowski-Owczarek2021-08-261-1/+1
| | | | | | | | | 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
* Datepicker: Get selectedDay from data-date instead of element contentsc-lambert2021-07-121-1/+2
| | | | | This makes datepicker work fine even if translation software modifies texts on the page. Closes gh-1943
* Build: Migrate from JSHint & JSCS to ESLintMichał Gołębiowski-Owczarek2021-06-0720-90/+199
| | | | | Fixes #15393 Closes gh-1958
* Datepicker: Add option for onUpdateDatepicker callbackPatrick McKay2021-05-211-1/+7
| | | | | | 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.
* Fix: Adapt datpicker.js for a11yMikolaj Wolicki2021-05-151-4/+9
|
* All: Drop $.ui.escapeSelector in favor of $.escapeSelectorMichał Gołębiowski-Owczarek2021-05-143-6/+3
| | | | Fixes #14991 Closes gh-1957
* Datepicker: Make sure text option are text, shorten HTML stringsMichał Gołębiowski-Owczarek2021-05-121-21/+115
| | | | | | | | 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
* Datepicker: Make sure altField is treated as a CSS selectorMichał Gołębiowski-Owczarek2021-05-041-1/+1
| | | Closes gh-1954
* Dialog: Workaround broken focus re-triggering in jQuery 3.4/3.5Michał Gołębiowski-Owczarek2021-02-221-10/+22
| | | | | | | | | | | 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
* Resizable: Fix CSP violation (style unsafe-inline)Jérémy Munsch2020-08-111-2/+3
|
* Menu: Account for scrollbars in jQuery 3.2Michał Gołębiowski-Owczarek2020-07-231-2/+14
| | | | | | | | | | 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
* All: Drop support for jQuery 1.7Michał Gołębiowski-Owczarek2020-07-221-4/+1
| | | Closes gh-1923
* All: Resolve most jQuery Migrate warningsMichał Gołębiowski-Owczarek2020-05-163-3/+3
| | | Closes gh-1919
* Datepicker: Fixed current instance memory leak and added unit testcasesjigar gala2020-03-231-0/+1
|
* All: Remove usage of jQuery positional selectorsMichał Gołębiowski-Owczarek2020-01-223-5/+11
| | | | | | | | | | | | | | | | | 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
* All: Use expr.pseudos instead of deprecated expr.filtersMaksymenkov Eugene2019-12-081-1/+1
| | | | | | See: https://github.com/jquery/jquery-migrate/blob/master/warnings.md#jqmigrate-jqueryexprfilters-is-deprecated-use-jqueryexprpseudos Closes gh-1887
* All: Migrate away from deprecated/removed Core APIsMichał Gołębiowski-Owczarek2019-12-0813-29/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Dialog: Fix shared event handler for modal dialogsScott González2017-05-171-15/+14
| | | | | | | | | 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
* All: Remove uses of `jQuery.proxy()`Scott González2017-05-171-2/+2
| | | | | Ref #15160 Closes gh-1813
* Core: Fix JQMIGRATE warning about `jQuery.expr[":"]`Eirik Sletteberg2017-05-022-2/+2
| | | | | | | This commit polyfills `jQuery.expr.pseudos` for old versions of jQuery. Fixes #15185 Closes gh-1773
* Menu: Ignore mouse events triggered due to page scrollingScott González2017-05-021-0/+12
| | | | | Fixes #9356 Closes gh-1806
* Menu: Handle mouse movement mixed with keyboard navigationScott González2017-05-021-23/+33
| | | | | Fixes #9357 Closes gh-1805
* Menu: Don't focus dividers when wrapping via keyboard navigationScott González2017-05-021-11/+13
| | | | | Fixes #15157 Closes gh-1804
* Button: Fix backcompat when called on collection of mixed elementsAlexander Schmitz2017-05-021-14/+73
| | | | | Fixes #15109 Closes gh-1808
* Sortable: Fix various scrolling issuesA. Wells2017-05-021-129/+168
| | | | | | | | | | | | | | | | | | | * Created _scroll extension point and migrated scroll code from _mouseDrag * Cleaned up logic for scrolled * Fixed appendTo functionality to match documentation * Remove unnecessary function calls * Move set-up position functions to appropriate place * Base scrollParent on placeholder and not helper * Update scrollParent when switching containers Fixes #3173 Fixes #15165 Fixes #15166 Fixes #15167 Fixes #15168 Fixes #15169 Fixes #15170 Closes gh-1793
* Menu: Close menus immediately on selection or click outsideScott González2017-04-251-2/+2
| | | | | Fixes #15034 Closes gh-1807
* Resizable: Keep user-provided handles on destroyKonstantin Dinev2017-04-171-3/+2
| | | | | Closes gh-1798 Ref gh-1795
* Resizable: Keep user defined handles on _setOptionKonstantin Dinev2017-02-241-2/+6
| | | | | Fixes #15084 Closes gh-1795
* Spinner: Ignore `mousewheel` events when not focusedScott González2017-02-211-1/+5
| | | | | Fixes #15139 Closes gh-1794
* Datepicker: Fix prev/next button behavior with `showCurrentAtPos`claudi2017-01-251-3/+1
| | | | | Fixes #15102 Closes gh-1784
* Autocomplete: Fix IE/Edge scrolling issuesRyan Oriecuia2017-01-251-23/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IE11 and scrolling autocompletes didn't get along great; this should help fix their relationship. When you click on an autocomplete scrollbar in IE11, the menu temporarily gains focus, which caused a couple problems. 1. Depending on how long you clicked, the dropdown could close. 2. Scrolling down by clicking the scrollbar's down arrow would misbehave. The list would pop back up to the top with the first item selected. We can fix both problems by modifying the focus/blur handling a bit. 1. There is a flag to instruct the control to ignore blurs, but it was getting cleared too quickly; when the code refocused the input after it was blurred, IE would send *another* blur event, which wasn't getting ignored and would close the dropdown. We now wait for the focus/blur pair to process before clearing the flag. 2. We remove the tabindex from the dropdown menu, which prevents menu's focus handler from firing. When you focus a menu, it will select the first menu item if none are selected. Selecting a menu item will scroll it into view if it's not visible. This combination of behaviors was causing the strange behavior when attempting to scroll down. I couldn't figure out a way to write a unit test for this, since it's IE only and seems to require user interaction. You can verify the previous behavior (and the fix) on `demos/autocomplete/maxheight.html` Fixes #9638 Closes gh-1785
* Selectmenu: Don't render options with the `hidden` attributeScott González2016-11-161-0/+4
| | | | Fixes #15098