Portal/Popups incompatible with preact-compat
See original GitHub issueTL;DR
When using Popups with preact-compat
, the event object passed to handleOpen
from the associated Portal does not contain a currentTarget
property, due to the way the event object is being cloned. This throws an error, preventing the Popup from being displayed when it is triggered by a mouse event.
Steps
- Create an application using
preact-cli
. - Install
semantic-ui-react
(andsemantic-ui-css
) as described in its documentation. - Alias
preact-compat
in place of React using Webpack, overriding the webpack config using the method described inpreact-cli
’s documentation. - Render a Popup component like so:
const Component = () => <Popup trigger={<p>Hover me</p>} />
- Mouse over the rendered component
Expected Result
- Popup is displayed.
Actual Result
- Popup is not displayed.
- Error thrown:
TypeError: Cannot read property `getBoundingClientRect' of undefined
Version
0.71.4
Testcase
Unable to provide test case, unless CodePen allows module aliasing
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Switching to Preact (from React)
Everything you need to know to switch from React to Preact. ... Setting up compat; PureComponent; memo; forwardRef; Portals; Suspense (experimental) ...
Read more >TgX - River Thames Conditions - Environment Agency - GOV.UK
Saudinet call rates, Pop indo terbaru 2012, Bangladesh president list, ... Universal studios hollywood music, Croatia serbia conflict, Aberdeen box office ...
Read more >2022-23 PSAT™ 8/9 Coordinator Manual
audio, Assistive Technology–Compatible (ATC), or braille format, you'll receive test ... Call UPS at 800-PICK-UPS (742-5877) to arrange pickup of materials.
Read more >Preact - Releases
Bug Fixes. Add an explicit default export for compatibility with esbuild (#3783, thanks @Verseth); Fix useId uniqueness with shared parents + DOM nodes...
Read more >Untitled
K-pop extreme survival stand up lyrics, College roger poulnard bage la ville, Abbildungsmatrix ... Nsic delhi admission 2015, Zenfolio login problems?
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@layershifter Thanks for the response, and I understand that this is not an intended use case. I’ve started work on a fix, but won’t raise a PR until I have proper test cases established.
Issue persists for me