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
Describe the bug
When using the mouse to select a range, as soon as the mouse goes over a mention node, the selection is reset. This only happens in Firefox, Chrome and Safari seems to work OK. Haven't tested on IE/Edge.
To Reproduce
Steps to reproduce the behavior:
0. Use Firefox
The selection will be gone as soon as the mouse touches a mention node.
Expected behavior
The selection should not be lost.
Desktop (please complete the following information):
OS: OS X Sonoma 14.1
Browser Firefox
Version 133.0
Additional context
While we are not using lexical-beautiful-mentions we have a node that was heavily inspired by the MentionNode and I thought I'd check out if the issue is also present in this repo and it turns out that it is.
Moreover, I have found a solution for this and am happy to create a PR for it if it's also agreeable to you. We ended up adding the following CSS rules to our node:
user-select: all;
-moz-user-select: none;
I have stumbled on this while reading lexical playground's source and saw this comment. Thought I'd give it a try with user-select and it seems to work just fine.
The text was updated successfully, but these errors were encountered:
@canibanoglu Greetings! I'm here to assist you with any bugs, questions, or contributions. Let me know how I can help you.
The issue you're experiencing with selection loss in Firefox when dragging the mouse over mention nodes is indeed a known problem. It seems to be specific to Firefox, as you've noted that Chrome and Safari do not exhibit this behavior. The solution you've proposed, using the CSS rules user-select: all; and -moz-user-select: none;, is a clever workaround that addresses the issue by ensuring that the mention nodes are selectable in a way that Firefox handles correctly.
If you're considering contributing this fix to the lexical-beautiful-mentions repository, it could be beneficial for others facing the same issue. Your approach aligns with similar solutions seen in other projects, like the Lexical Playground, which suggests that this is a reasonable and effective fix.
Describe the bug
When using the mouse to select a range, as soon as the mouse goes over a mention node, the selection is reset. This only happens in Firefox, Chrome and Safari seems to work OK. Haven't tested on IE/Edge.
To Reproduce
Steps to reproduce the behavior:
0. Use Firefox
Expected behavior
The selection should not be lost.
Desktop (please complete the following information):
Additional context
While we are not using
lexical-beautiful-mentions
we have a node that was heavily inspired by the MentionNode and I thought I'd check out if the issue is also present in this repo and it turns out that it is.Moreover, I have found a solution for this and am happy to create a PR for it if it's also agreeable to you. We ended up adding the following CSS rules to our node:
I have stumbled on this while reading lexical playground's source and saw this comment. Thought I'd give it a try with
user-select
and it seems to work just fine.The text was updated successfully, but these errors were encountered: