-
Notifications
You must be signed in to change notification settings - Fork 348
Prevent date inputs shifting alignment on iOS 18 #6454
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
Conversation
Stylesheets changes to npm packagediff --git a/packages/govuk-frontend/dist/govuk/govuk-frontend.min.css b/packages/govuk-frontend/dist/govuk/govuk-frontend.min.css
index 741b02be4..2f6332e72 100644
--- a/packages/govuk-frontend/dist/govuk/govuk-frontend.min.css
+++ b/packages/govuk-frontend/dist/govuk/govuk-frontend.min.css
@@ -2700,7 +2700,8 @@ screen and (forced-colors:active) {
.govuk-date-input__item {
display: inline-block;
margin-right: 20px;
- margin-bottom: 0
+ margin-bottom: 0;
+ vertical-align: bottom
}
.govuk-date-input__label {
Action run for bb7f29c |
Other changes to npm packagediff --git a/packages/govuk-frontend/dist/govuk/components/date-input/_index.scss b/packages/govuk-frontend/dist/govuk/components/date-input/_index.scss
index 43d1bc7c6..38c670858 100644
--- a/packages/govuk-frontend/dist/govuk/components/date-input/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/date-input/_index.scss
@@ -14,6 +14,11 @@
display: inline-block;
margin-right: govuk-spacing(4);
margin-bottom: 0;
+
+ // Prevents an issue in iOS Safari 18 where the items vertically
+ // shift when the value of inputs is changed.
+ // https://github.com/alphagov/reported-bugs/issues/90
+ vertical-align: bottom;
}
.govuk-date-input__label {
Action run for bb7f29c |
364422e to
9cf64ea
Compare
9cf64ea to
ae1071d
Compare
📋 StatsNo changes to any distributed file sizes! Action run for bb7f29c |
|
Thanks @querkmachine I've snagged this (co-author credit) for NHS.UK frontend too Much appreciated |
|
Not sure why the Heroku deployment is failing. Investigating... Edit: Info here - #6455 |
ae1071d to
84cc312
Compare
84cc312 to
3175505
Compare
romaricpascal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally got a chance to look at this on an actual device, the bug is fixed! Nice one 🙌🏻
Due to an upstream issue in Safari on iOS 18 (and potentially 17), the box model calculations for these inputs go iffy when the value is deleted and re-typed. The upstream issue was reported during the beta period of iOS 26 and fixed in the release of iOS 26 in September, however no fix for older versions seems to be coming, so we should prevent the issue in our own code in the meantime. NHS.UK Frontend issue: nhsuk/nhsuk-frontend#1227 Our bug report: alphagov/reported-bugs#90
3175505 to
bb7f29c
Compare
Due to an upstream issue in Safari on iOS 18 (and potentially iOS 17), the box model calculations for children of the Date input component go a bit wrong when an input's value is deleted and re-typed.
The issue was reported to the WebKit team during the beta period of iOS 26 and fixed before the final release of iOS 26 in September, however no fix for older versions of iOS has yet happened nor appears to be coming, so we should prevent the issue in our own code until iOS 18 has fallen out of browsers we support.
The specific fix is the one suggested by @colinrotherham in the NHS.UK Frontend issue: nhsuk/nhsuk-frontend#1227 (comment)
Closes #5861.
Changes
vertical-alignrule to items within the Date input component.