Skip to content

Date Input layout shift on iPad #1227

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

Open
rowellx68 opened this issue Apr 10, 2025 · 5 comments
Open

Date Input layout shift on iPad #1227

rowellx68 opened this issue Apr 10, 2025 · 5 comments

Comments

@rowellx68
Copy link

Bug Report

What is the issue?

On iPad we are seeing some layout shift within Date Input in certain scenarios. Curiously, this issue does not happen when screen recording is in session or within Xcode Simulator.

This issue occurs in the GOV.UK date input as well.

What steps are required to reproduce the issue?

  1. Go to the date input standalone example
  2. Enter 12 in the Day input
  3. Delete 12 from the Day input
  4. Enter 1 in the Day input

The same steps could be applied to the Month and Year inputs will produce a similar effect.

What was the environment where this issue occurred?

  • Device: iPad Pro (11-inch) (4th generation)
  • Operating System: iPadOS 18.4
  • Browser: Safari
  • Browser version: 18.4
  • NHS.UK frontend package version: 9.3.0
  • Node version: N/A
  • npm version: N/A

Is there anything else you think would be useful in recreating the issue?

Image

Image

@colinrotherham
Copy link
Contributor

Thanks @rowellx68

I've tried on my own iPad (same version, iPadOS 18.4) and can't replicate it

Could you give it a try without any Safari extensions running please?

@rowellx68
Copy link
Author

Thanks @colinrotherham. I've tried it again without any extensions and it still happens. Here's a video of me doing testing it since screen recording seems to be preventing the issue for happening.

IMG_0777-converted.mov

We also tested and could reproduce with an iPad Air (4th gen, iPadOS 18.4) without any extensions.

@colinrotherham
Copy link
Contributor

Ah ha, gotcha

Yep I can reproduce it now, video was a big help—thanks

Would you mind raising this please on GOV.UK Frontend issues or I can raise it for you?

(Our NHS component was copied from GOV.UK Frontend)

@rowellx68
Copy link
Author

Sure, I'll report it over there as well and will record a similar video

@colinrotherham
Copy link
Contributor

colinrotherham commented Apr 11, 2025

Brilliant, thanks

Just tried adding vertical-align: top to .nhsuk-date-input__item and it fixes the issue for me

Update: Probably want vertical-align: bottom as it's the input alignment that's more important

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants