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
In the Playground, make the content longer than the current screen height.
Turn on the Use Lexical Context Menu from the Settings
Highlight something and then Right Click to show the Context Menu.
Scroll.
Highlight something else again and then Right Click. The Context Menu is now in a different location.
(optional) With the context menu showing, scroll the page.
The current behavior
The Context Menu gets mis-aligned. It could be a couple lines down the current highlighted text.
It also gets moved around when the user scrolls the page.
The expected behavior
The Context Menu should be next to the highlighted content.
It should stick and not move when the user scrolls the page.
The text was updated successfully, but these errors were encountered:
The code from the playground is not expected to be production-ready, and is not part of the Lexical library. It's only provided as examples for some functionality.
That being said, this does not qualify as a bug, but you are welcome to contribute with a PR for fixing the aforementioned behaviour, so that other users using the playground code can benefit from it.
I would say that the menu positioning is a bug, that we've been trying to fix but it's been tricky because Meta has (had?) some dependencies on the confusing/broken legacy behavior. Any improvements here would be appreciated. See also #6558, #6566, #6510, etc.
I think maybe it's worth doing a clean slate context menu based on 'floating-ui.com', rather than try to fix this one for n-th time. For anyone interested, that would be my suggestion.
Lexical version: 0.18.0
Steps To Reproduce
Use Lexical Context Menu
from theSettings
Right Click
to show the Context Menu.Right Click
. The Context Menu is now in a different location.The current behavior
The Context Menu gets mis-aligned. It could be a couple lines down the current highlighted text.
It also gets moved around when the user scrolls the page.
The expected behavior
The Context Menu should be next to the highlighted content.
It should stick and not move when the user scrolls the page.
The text was updated successfully, but these errors were encountered: