Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highlight is sticky on scrollable container #761

Open
Omrigotlieb opened this issue Oct 27, 2024 · 1 comment
Open

Highlight is sticky on scrollable container #761

Omrigotlieb opened this issue Oct 27, 2024 · 1 comment

Comments

@Omrigotlieb
Copy link

image
image

Steps to reproduce:

  1. Go to your mention component or to https://react-mentions.vercel.app/ to Suggestion portal example
  2. Click Shift + Enter few times
  3. the highlight of the mentions is sticky
  4. Try adding multiple users

Expected behavior:
Highlight will disappear while scrolling
Observed behaviour:
Highlight is stuck on screen
Workaround:
none

@PaoloSikuro
Copy link

To anyone reaching this discussion after finding this "bug", the issue comes from the styiling.
Take this example as reference https://github.com/signavio/react-mentions/blob/master/demo/src/examples/Scrollable.js
you need to add the input and highlighter style to the mentionsInput component
input: {
overflow: 'auto',
height: 70,
},
highlighter: {
boxSizing: 'border-box',
overflow: 'hidden',
height: 70,
},
in this particular case it is the highlighter style that removes the sticky bad beaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants