Commit Graph

3913 Commits

Author SHA1 Message Date
c-lambert
cf938e2863
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
2021-07-12 09:41:41 +02:00
Michał Gołębiowski-Owczarek
70dae67b73
Build: Migrate from JSHint & JSCS to ESLint
Fixes #15393
Closes gh-1958
2021-06-07 00:58:12 +02:00
Patrick McKay
17d115b829 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.
2021-05-21 17:58:10 +02:00
Mikolaj Wolicki
b864cd103a Fix: Adapt datpicker.js for a11y 2021-05-15 18:29:08 +02:00
Michał Gołębiowski-Owczarek
7c6a9f0128
All: Drop $.ui.escapeSelector in favor of $.escapeSelector
Fixes #14991
Closes gh-1957
2021-05-14 23:37:19 +02:00
Michał Gołębiowski-Owczarek
afe20b79a6
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
2021-05-12 00:59:42 +02:00
Michał Gołębiowski-Owczarek
effa323f15
Position: Make sure of is treated as a CSS selector
Closes gh-1955
2021-05-04 13:31:39 +02:00
Michał Gołębiowski-Owczarek
32850869d3
Datepicker: Make sure altField is treated as a CSS selector
Closes gh-1954
2021-05-04 13:30:06 +02:00
Michał Gołębiowski-Owczarek
834ee5f7cf
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
2021-02-22 00:02:02 +01:00
Paul Capron
f5d38e2e05
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 d3025968f3 introduced a regression by testing with `!== "hidden"`
instead of `=== "visible"`.

Closes gh-1843
2020-10-14 23:53:11 +02:00
Hrvoje Novosel
2434dfd45d 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
2020-10-06 14:54:13 +02:00
Jérémy Munsch
dadde722a4 Resizable: Fix CSP violation (style unsafe-inline) 2020-08-11 23:43:45 +02:00
Michał Gołębiowski-Owczarek
74b5d8d7b9
All: Remove a leftover empty file
Closes gh-1933
2020-07-24 13:23:23 +02:00
Michał Gołębiowski-Owczarek
1712b9bbb2
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
2020-07-23 15:55:18 +02:00
Michał Gołębiowski-Owczarek
b61b16b5a8
All: Drop support for jQuery 1.7
Closes gh-1923
2020-07-22 16:04:47 +02:00
Michał Gołębiowski-Owczarek
f4ef03e57e
All: Resolve most jQuery Migrate warnings
Closes gh-1919
2020-05-16 08:36:55 +02:00
Michał Gołębiowski-Owczarek
7caf8f61df
Build: Rename jquery-1-7 to jquery-patch
The file now contains many more than just jQuery 1.7 patches.

Closes gh-1917
2020-05-16 08:29:08 +02:00
Michał Gołębiowski-Owczarek
512cbbf4d9
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
2020-05-16 08:26:48 +02:00
Fatér Zsolt
9bb366ef8a Datepicker: Fix Hungarian localization to use uppercase for first characters 2020-03-23 22:49:10 +01:00
Florian Wegscheider
ddbcc5d29d Datepicker: Add German localization 2020-03-23 22:09:38 +01:00
jigar gala
817ce38555 Datepicker: Fixed current instance memory leak and added unit testcases 2020-03-23 21:49:23 +01:00
Michał Gołębiowski-Owczarek
0c860b0d92
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
2020-01-22 16:44:34 +01:00
OskarNS
9c0d83f2e5 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
2019-12-09 21:11:13 +01:00
Maksymenkov Eugene
995b5faec9 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
2019-12-08 22:27:16 +01:00
Michał Gołębiowski-Owczarek
98b539171b 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
2019-12-08 22:23:08 +01:00
Horus68
6fdd0e34a7 Datepicker: Fix first day of week for pt-PT locale
Fixes #15195
Closes gh-1820
2017-05-31 11:10:41 -04:00
Scott González
5708046ea1 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
2017-05-17 11:29:09 -04:00
Scott González
809f29efa7 All: Remove uses of jQuery.proxy()
Ref #15160
Closes gh-1813
2017-05-17 11:17:17 -04:00
Scott González
0940cb9bd2 All: Remove uses of jQuery.camelCase()
Ref #15160
Ref gh-1813
2017-05-17 11:17:09 -04:00
Scott González
efb1fee02b Position: Increase scrollbar test div to handle larger scrollbars
Fixes #15106
Closes gh-1811
2017-05-04 11:00:59 -04:00
Eirik Sletteberg
0b7246b6ee Core: Fix JQMIGRATE warning about jQuery.expr[":"]
This commit polyfills `jQuery.expr.pseudos` for old versions of jQuery.

Fixes #15185
Closes gh-1773
2017-05-02 15:28:51 -04:00
Scott González
50efd6e1b0 Menu: Ignore mouse events triggered due to page scrolling
Fixes #9356
Closes gh-1806
2017-05-02 15:16:17 -04:00
Scott González
7d992ae29d Menu: Handle mouse movement mixed with keyboard navigation
Fixes #9357
Closes gh-1805
2017-05-02 15:12:47 -04:00
Scott González
a3e953b495 Menu: Don't focus dividers when wrapping via keyboard navigation
Fixes #15157
Closes gh-1804
2017-05-02 15:12:04 -04:00
Alexander Schmitz
abc9e7ce2f Button: Fix backcompat when called on collection of mixed elements
Fixes #15109
Closes gh-1808
2017-05-02 15:11:24 -04:00
A. Wells
c866e45537 Sortable: Fix various scrolling issues
* 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
2017-05-02 13:34:02 -04:00
Scott González
adcf9b6f6e Labels: Handle empty sets
Fixes #15184
2017-05-02 12:42:49 -04:00
Scott González
0d25a36eec Menu: Close menus immediately on selection or click outside
Fixes #15034
Closes gh-1807
2017-04-25 06:33:00 -04:00
Scott González
b3c0a7f71d Widget: Handle Object.create(null) for options objects
Fixes #15179
Closes gh-1809
2017-04-24 12:41:29 -04:00
Scott González
ef2e9bab92 Widget: Improve remove event bindings for classes options
Fixes #15078
Fixes #15082
Fixes #15095
Fixes #15136
Fixes #15152
Closes gh-1769
2017-04-19 12:53:53 -04:00
Konstantin Dinev
c426b9a203 Resizable: Keep user-provided handles on destroy
Closes gh-1798
Ref gh-1795
2017-04-17 14:58:12 -04:00
Albert Johansson
032ddc3349 Datepicker: Corrections for Swedish localization
Months and weekdays should be in small caps in Swedish.
https://sv.wikipedia.org/wiki/Versalisering

Fixes #15142
Closes gh-1799
2017-03-01 13:43:47 -05:00
Scott González
1f2011ece3 Widget: Don't swallow errors in remove events
The try/catch was only there to support jQuery <1.6.3, which we no
longer support.

Ref jquery/jquery#3554
2017-02-28 09:51:59 -05:00
Konstantin Dinev
278d1e1108 Resizable: Keep user defined handles on _setOption
Fixes #15084
Closes gh-1795
2017-02-24 14:30:58 -05:00
Scott González
a3b9129be1 Spinner: Ignore mousewheel events when not focused
Fixes #15139
Closes gh-1794
2017-02-21 12:45:19 -05:00
claudi
17404ced47 Datepicker: Fix prev/next button behavior with showCurrentAtPos
Fixes #15102
Closes gh-1784
2017-01-25 11:14:57 -05:00
Ryan Oriecuia
573e7e69c9 Autocomplete: Fix IE/Edge scrolling issues
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
2017-01-25 10:57:34 -05:00
Luke Brookhart
4b9f32486c Effect: Fix typo
Closes gh-1778
2016-12-16 19:55:44 -05:00
Scott González
a2b25ef6ca Selectmenu: Don't render options with the hidden attribute
Fixes #15098
2016-11-16 12:52:15 -05:00
pallxk
9a4c057157 Tooltip: Clear interval for delayed tracking tooltips on remove
This is needed in the case that the tooltip is removed before it gets shown.

Fixes #15099
Closes gh-1768
2016-11-16 12:12:22 -05:00