You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently started integrating grapesjs into a web application that I work on. In order to support mobile devices, I added the touch plugin.
I am noticing that when I have the editor nested in a specific location within the document, touch events are not propagated to the correct component within the iframe. This seems to stem from the getTarget function of DragDropTouch, where the iframe's absolute offset within the document is subtracted from the coordinates of the event.
My testing demonstrates that instead of calculating and using the iframe's offset within the document, its offset from the viewport should instead be used (via el.getBoundingClientRect)
Somebody had posted an issue in the main grapesjs repository with similar effects to what I am experiencing, but they closed it themselves without explaining if they found a different solution: GrapesJS/grapesjs#1571
I do not observe these problems when using the live demo for the newsletter editor.
My question is: Is my assumption correct that the plugin should be calculating offset in terms of viewport, or have I made an error on my own part when setting up the editor?
The text was updated successfully, but these errors were encountered:
Hello there,
I recently started integrating grapesjs into a web application that I work on. In order to support mobile devices, I added the touch plugin.
I am noticing that when I have the editor nested in a specific location within the document, touch events are not propagated to the correct component within the iframe. This seems to stem from the getTarget function of DragDropTouch, where the iframe's absolute offset within the document is subtracted from the coordinates of the event.
My testing demonstrates that instead of calculating and using the iframe's offset within the document, its offset from the viewport should instead be used (via
el.getBoundingClientRect
)Somebody had posted an issue in the main grapesjs repository with similar effects to what I am experiencing, but they closed it themselves without explaining if they found a different solution:
GrapesJS/grapesjs#1571
I do not observe these problems when using the live demo for the newsletter editor.
My question is: Is my assumption correct that the plugin should be calculating offset in terms of viewport, or have I made an error on my own part when setting up the editor?
The text was updated successfully, but these errors were encountered: