generated from oddbird/polyfill-template
-
-
Notifications
You must be signed in to change notification settings - Fork 15
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When trying to use the polyfill in a React app, the variable names (CSS properties) used for anchoring and positioning the target gets rendered in the DOM (added to the anchor and target elements), but the actual values are incorrect, and the references that are supposed to be added to html element aren't rendered, causing the polyfill to not work as intended.
I've also tried calling the polyfill() like this in App.js:
const anchorRef = useRef();
const targetRef = useRef();
useEffect(() => {
if(!anchorRef.current || !targetRef.current) {
return null
}
polyfill({ elements: [anchorRef.current, targetRef.current] })
}, [anchorRef, targetRef])
… but that doesn't trigger any of the polyfills.
To Reproduce
CodeSandbox
Browsers tested on
- macOS Sequoia 15.0.1
- Safari 18.0.1
- Firefox 133.0.3
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working