-
-
Notifications
You must be signed in to change notification settings - Fork 421
Description
Describe the bug
I'm trying to use the library inside the iframed block editor in WordPress and I'm getting the following error:
react-dom.js?ver=18.3.1.1:22888 Uncaught Error: Panzoom should be called on elements that have been attached to the DOM
Your environment
- Version of panzoom: 4.6.1
- Browser and browser version: Firefox 147.0
Expected behavior
The library should work inside the iframed block editor without throwing an error.
Actual behavior
An error is thrown because the library relies on the global window or document:
react-dom.js?ver=18.3.1.1:22888 Uncaught Error: Panzoom should be called on elements that have been attached to the DOM
Steps to reproduce
Install and run the WordPress plugin found in: https://github.com/mrleemon/rather-simple-panzoom/
Possible fix
According the WordPress developers, to make the library work inside the iframed block editor, a small change should be made to the isAttached() function in: