@react-aria/overlays
Advanced tools
Comparing version 3.0.0-nightly-7eae25e12-241205 to 3.0.0-nightly-8228e4efd-241207
@@ -111,17 +111,3 @@ var $59kHH$reactariautils = require("@react-aria/utils"); | ||
}; | ||
let onTouchEnd = (e)=>{ | ||
let target = e.target; | ||
// Apply this change if we're not already focused on the target element | ||
if ($5c2f5cd01815d369$var$willOpenKeyboard(target) && target !== document.activeElement) { | ||
e.preventDefault(); | ||
setupStyles(); | ||
// Apply a transform to trick Safari into thinking the input is at the top of the page | ||
// so it doesn't try to scroll it into view. When tapping on an input, this needs to | ||
// be done before the "focus" event, so we have to focus the element ourselves. | ||
target.style.transform = 'translateY(-2000px)'; | ||
target.focus(); | ||
requestAnimationFrame(()=>{ | ||
target.style.transform = ''; | ||
}); | ||
} | ||
let onTouchEnd = ()=>{ | ||
if (restoreScrollableStyles) restoreScrollableStyles(); | ||
@@ -133,6 +119,4 @@ }; | ||
setupStyles(); | ||
// Transform also needs to be applied in the focus event in cases where focus moves | ||
// other than tapping on an input directly, e.g. the next/previous buttons in the | ||
// software keyboard. In these cases, it seems applying the transform in the focus event | ||
// is good enough, whereas when tapping an input, it must be done before the focus event. 🤷♂️ | ||
// Apply a transform to trick Safari into thinking the input is at the top of the page | ||
// so it doesn't try to scroll it into view. | ||
target.style.transform = 'translateY(-2000px)'; | ||
@@ -139,0 +123,0 @@ requestAnimationFrame(()=>{ |
@@ -105,17 +105,3 @@ import {useLayoutEffect as $7mMvr$useLayoutEffect, isIOS as $7mMvr$isIOS, chain as $7mMvr$chain, getScrollParent as $7mMvr$getScrollParent} from "@react-aria/utils"; | ||
}; | ||
let onTouchEnd = (e)=>{ | ||
let target = e.target; | ||
// Apply this change if we're not already focused on the target element | ||
if ($49c51c25361d4cd2$var$willOpenKeyboard(target) && target !== document.activeElement) { | ||
e.preventDefault(); | ||
setupStyles(); | ||
// Apply a transform to trick Safari into thinking the input is at the top of the page | ||
// so it doesn't try to scroll it into view. When tapping on an input, this needs to | ||
// be done before the "focus" event, so we have to focus the element ourselves. | ||
target.style.transform = 'translateY(-2000px)'; | ||
target.focus(); | ||
requestAnimationFrame(()=>{ | ||
target.style.transform = ''; | ||
}); | ||
} | ||
let onTouchEnd = ()=>{ | ||
if (restoreScrollableStyles) restoreScrollableStyles(); | ||
@@ -127,6 +113,4 @@ }; | ||
setupStyles(); | ||
// Transform also needs to be applied in the focus event in cases where focus moves | ||
// other than tapping on an input directly, e.g. the next/previous buttons in the | ||
// software keyboard. In these cases, it seems applying the transform in the focus event | ||
// is good enough, whereas when tapping an input, it must be done before the focus event. 🤷♂️ | ||
// Apply a transform to trick Safari into thinking the input is at the top of the page | ||
// so it doesn't try to scroll it into view. | ||
target.style.transform = 'translateY(-2000px)'; | ||
@@ -133,0 +117,0 @@ requestAnimationFrame(()=>{ |
{ | ||
"name": "@react-aria/overlays", | ||
"version": "3.0.0-nightly-7eae25e12-241205", | ||
"version": "3.0.0-nightly-8228e4efd-241207", | ||
"description": "Spectrum UI components in React", | ||
@@ -25,12 +25,12 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@react-aria/focus": "^3.0.0-nightly-7eae25e12-241205", | ||
"@react-aria/i18n": "^3.0.0-nightly-7eae25e12-241205", | ||
"@react-aria/interactions": "^3.0.0-nightly-7eae25e12-241205", | ||
"@react-aria/ssr": "^3.0.0-nightly-7eae25e12-241205", | ||
"@react-aria/utils": "^3.0.0-nightly-7eae25e12-241205", | ||
"@react-aria/visually-hidden": "^3.0.0-nightly-7eae25e12-241205", | ||
"@react-stately/overlays": "^3.0.0-nightly-7eae25e12-241205", | ||
"@react-types/button": "^3.0.0-nightly-7eae25e12-241205", | ||
"@react-types/overlays": "^3.0.0-nightly-7eae25e12-241205", | ||
"@react-types/shared": "^3.0.0-nightly-7eae25e12-241205", | ||
"@react-aria/focus": "^3.0.0-nightly-8228e4efd-241207", | ||
"@react-aria/i18n": "^3.0.0-nightly-8228e4efd-241207", | ||
"@react-aria/interactions": "^3.0.0-nightly-8228e4efd-241207", | ||
"@react-aria/ssr": "^3.0.0-nightly-8228e4efd-241207", | ||
"@react-aria/utils": "^3.0.0-nightly-8228e4efd-241207", | ||
"@react-aria/visually-hidden": "^3.0.0-nightly-8228e4efd-241207", | ||
"@react-stately/overlays": "^3.0.0-nightly-8228e4efd-241207", | ||
"@react-types/button": "^3.0.0-nightly-8228e4efd-241207", | ||
"@react-types/overlays": "^3.0.0-nightly-8228e4efd-241207", | ||
"@react-types/shared": "^3.0.0-nightly-8228e4efd-241207", | ||
"@swc/helpers": "^0.5.0" | ||
@@ -37,0 +37,0 @@ }, |
@@ -142,20 +142,3 @@ /* | ||
let onTouchEnd = (e: TouchEvent) => { | ||
let target = e.target as HTMLElement; | ||
// Apply this change if we're not already focused on the target element | ||
if (willOpenKeyboard(target) && target !== document.activeElement) { | ||
e.preventDefault(); | ||
setupStyles(); | ||
// Apply a transform to trick Safari into thinking the input is at the top of the page | ||
// so it doesn't try to scroll it into view. When tapping on an input, this needs to | ||
// be done before the "focus" event, so we have to focus the element ourselves. | ||
target.style.transform = 'translateY(-2000px)'; | ||
target.focus(); | ||
requestAnimationFrame(() => { | ||
target.style.transform = ''; | ||
}); | ||
} | ||
let onTouchEnd = () => { | ||
if (restoreScrollableStyles) { | ||
@@ -171,6 +154,4 @@ restoreScrollableStyles(); | ||
// Transform also needs to be applied in the focus event in cases where focus moves | ||
// other than tapping on an input directly, e.g. the next/previous buttons in the | ||
// software keyboard. In these cases, it seems applying the transform in the focus event | ||
// is good enough, whereas when tapping an input, it must be done before the focus event. 🤷♂️ | ||
// Apply a transform to trick Safari into thinking the input is at the top of the page | ||
// so it doesn't try to scroll it into view. | ||
target.style.transform = 'translateY(-2000px)'; | ||
@@ -177,0 +158,0 @@ requestAnimationFrame(() => { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
654165
7411