We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17b7903 commit 4937668Copy full SHA for 4937668
packages/@react-aria/overlays/src/usePreventScroll.ts
@@ -126,7 +126,9 @@ function preventScrollMobileSafari() {
126
127
let onTouchEnd = (e: TouchEvent) => {
128
let target = e.target as HTMLElement;
129
- if (target instanceof HTMLInputElement && !nonTextInputTypes.has(target.type)) {
+
130
+ // Apply this change if we're not already focused on the target element
131
+ if (target instanceof HTMLInputElement && !nonTextInputTypes.has(target.type) && target !== document.activeElement) {
132
e.preventDefault();
133
134
// Apply a transform to trick Safari into thinking the input is at the top of the page
0 commit comments