isaul32 / ckeditor5-math

Math feature for CKEditor 5.
https://www.npmjs.com/package/ckeditor5-math
ISC License
86 stars 39 forks source link

Preview workaround scrolling issue #138

Open JinalSinroja opened 7 months ago

JinalSinroja commented 7 months ago

I am having scrolling issue with the formula preview, as you have stated here that rendering element is out of ckeditor dom and you are giving absolute position according to the window.

image

what my issue is, I'm not using the window scroll

https://github.com/isaul32/ckeditor5-math/assets/66769548/5d64fe10-d2f3-4860-8529-7c81bbd4f627

So the absolute position is stick to the window , which is not scrollable.

JinalSinroja commented 6 months ago

We also couldn't get it right with ckeditor scroll too. it only takes the window scroll, so whenever we scroll into ckeditor area, it stays at the place, it doesn't scroll with the pop up

Here is the video to get the better idea.

https://github.com/isaul32/ckeditor5-math/assets/66769548/347daa6c-72cb-4acf-80dc-930c42246808

tony commented 6 months ago

@JinalSinroja The formula preview itself shows up in a different part of page - so its hard to reach with Inspector / Devtools.

If you were to use previewClassName and popupClassName, and adjust the CSS within those classnames, does that help?

While I can't solve the problem for you, it looks like its something to do with z-index or position.

JinalSinroja commented 5 months ago

@tony Thanks for responding.

We applied the approach of updating the position of math-preview div. We are listening on scroll event and updating the position of preview class, as we didn't have any other option better than this

image