react-spectrum: Unable to dismiss iOS keyboard when input has focus in modal dialog

Provide a general summary of the issue here

When an input field is focused in a dialog on Mobile Safari, the user is unable to dismiss the keyboard using the Done button.

πŸ€” Expected Behavior?

The user should be able to dismiss the keyboard.

😯 Current Behavior

The user is unable to dismiss the keyboard.

πŸ’ Possible Solution

No response

πŸ”¦ Context

Not being able to dismiss the keyboard makes it hard to escape the dialog.

πŸ–₯️ Steps to Reproduce

This reproduces in the official Spectrum sample for dialog

https://github.com/user-attachments/assets/77142acc-d21b-42a7-8b27-65e24d811bd4

Version

Version live on Spectrum docs site

What browsers are you seeing the problem on?

Safari

If other, please specify.

No response

What operating system are you using?

iOS

🧒 Your Company/Team

No response

πŸ•· Tracking Issue

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (12 by maintainers)

Most upvoted comments

You can leave this one open. We need to do some investigating into all the things mentioned here so far and they are likely related. I think once someone has identified some paths forward we can consider breaking it apart.

Not sure if this caused by the same underlying issue, but when scrolling by dragging, if the scroll is initiated by touching an input or label element, on release, that element receives focus, resulting in unwanted jumping.

EDIT: Here’s a video, I had to remove the footer elements to provide enough space to demo this

https://github.com/user-attachments/assets/93a61b42-45d9-492e-90b6-87b9241174ae

EDIT 2: This issue also reproduces on Chrome for iOS, but not when using the device toolbar on Chrome for macOS.