Skip to content

[pull] main from jquery:main#85

Merged
pull[bot] merged 1 commit intoTheRakeshPurohit:mainfrom
jquery:main
Feb 9, 2026
Merged

[pull] main from jquery:main#85
pull[bot] merged 1 commit intoTheRakeshPurohit:mainfrom
jquery:main

Conversation

@pull
Copy link

@pull pull bot commented Feb 9, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

jQuery 4.0+ follows native focus events order, meaning that `focusin`
is fired after `focus`. As delegated `focus` is implemented in jQuery
via `focusin`, `focus` handlers attached during a delegated `focus`
handler will not fire until the second time the field receives focus.
This is what the `_attachments` method does. To account for that, show
the datepicker if input is already focused. `_showDatepicker` checks
if the datepicker is already open, so it's not a problem that it
fires again as a `focus` handler in jQuery <4.

Note that the fact such an initialization worked inside of delegated
focus handlers was a result of an implementation detail in jQuery. If
a regular `focus` handler was used to initialize the datepicker, neither
jQuery 4.0 nor 3.x would show the datepicker. This issue is now fixed
as well.

Fixes gh-2385
Closes gh-2390
@pull pull bot locked and limited conversation to collaborators Feb 9, 2026
@pull pull bot added the ⤵️ pull label Feb 9, 2026
@pull pull bot merged commit d327be4 into TheRakeshPurohit:main Feb 9, 2026
10 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant