-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Provide a general summary of the issue here
devongovett Did a great job in this MR, but the issue still persists. If you open the modal, focus on the date, and then close the keyboard by tapping on an empty area in the modal (Iβve marked this spot with a red arrow), then refocus on the date β the modal shifts upward. This can also be reproduced by opening the modal then several times tapping on an empty area, and then focusing on the date β the modal will move up again. IOS 26, on IOS 18 work fine.
π€ Expected Behavior?
damn safari never scroll the viewport
π― Current Behavior
damn safari scroll the viewport
π Possible Solution
idk, for now i do this, but hope there some other solutions
`
const debouncedScrollToTop = lodash.debounce(() => {
document.documentElement.scrollTo({ top: 0 });
}, 50);
const onVisualScroll = () => {
if (document.documentElement.scrollTop !== 0 || (visualViewport?.offsetTop || 0) !== 0) {
debouncedScrollToTop();
}
};
visualViewport?.addEventListener('scroll', onVisualScroll);
`
π¦ Context
No response
π₯οΈ Steps to Reproduce
- open https://react-spectrum.adobe.com/react-aria/index.html on ios26
- open test modal
- focus on date input
- close the keyboard by tap on empty space
- focus on date input again
- safari did this again(
or
- open https://react-spectrum.adobe.com/react-aria/index.html on ios26
- open test modal
- tap on empty space several times
- focus on date input
- safari did this again(
Version
latest i guess
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

