Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] dev from opf:dev #533

Merged
merged 6 commits into from
Apr 5, 2025
Merged

[pull] dev from opf:dev #533

merged 6 commits into from
Apr 5, 2025

Conversation

pull[bot]
Copy link

@pull pull bot commented Apr 5, 2025

See Commits and Changes for more details.


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

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

cbliard and others added 6 commits April 4, 2025 09:16
https://community.openproject.org/wp/62595

Idiomorph is used to morph the date picker dialog content, except the
active element. When clicking the date button in Safari, it does not
become the active element because it's actually a link, and for some
reason links cannot be active in Safari. What becomes active instead is
the closest focusable parent element. It is the whole
`panel-wp-datepicker-dialog--content-tab--dates` as it has `tabindex:
0`. As idiomorph does not change the active element, that's why the date
fields stayed the same.

To fix this, we make pass `ignoreActiveValue = true` to idiomorph only
if the active element is an input. This way the whole date picker form
is always updated when no input is focused.

It also fixes similar issues that existed on "Today" links and "Working
days only" checkbox too.

The `data: { skip_morphing: true }` is some dead code leftover that is
no longer used.
Saw some errors in the console from `prepareInputFieldsForSafari`
method: startDateField and dueDateField are undefined when the
blank slate is displayed when a work package cannot be switched to
automatic.

Fixed the error by fixing type declarations of `startDateField`,
`dueDateField` and `durationField` in `PreviewController` and fix
resulting errors.
…n-single-date-mode-on-date-picker-on-safari

[62595] Fix date buttons not opening input in Safari in date picker
@pull pull bot added the ⤵️ pull label Apr 5, 2025
@pull pull bot merged commit edfff2b into kp-forks:dev Apr 5, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants