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

When use scrollable <MentionsInput> and add multiple texts, mention is fixed on the area while scrolling and breaks user interface #667

Open
rostyslavDoskochynskiy opened this issue Apr 21, 2023 · 2 comments

Comments

@rostyslavDoskochynskiy
Copy link

rostyslavDoskochynskiy commented Apr 21, 2023

Steps to reproduce:

  1. Add text-area with minimal fixed height and limit max height of any value
  2. Make this text-area scrollable and add multiline text
<MentionsInput
        type="mentions"
        name="message"
        allowSpaceInQuery
        autoFocus
        placeholder="Write a reply..."
        value={value}
        onChange={handleOnInputChange}
        rendernestederror="false"
        style={mentionsInputStyle}
>
const mentionsInputStyle = {
  control: {
    backgroundColor: '#fff',
    fontSize: 13,
    minHeight: 30,
  },
  '&multiLine': {
    control: {
      minHeight: 30,
      maxHeight: 60,
      width: 220,
    },
    highlighter: {
      padding: '10px 0 9px 5px',
      minHeight: 30,
      maxHeight: 60,
    },
    input: {
      padding: 9,
      minHeight: 30,
      marginRight: 10,
      overflowY: 'scroll',
    },
  },

  '&singleLine': {
    display: 'inline-block',
    width: 180,
    minHeight: 30,

    highlighter: {
      padding: 1,
      border: '2px inset transparent',
    },
    input: {
      padding: 1,
      border: '2px inset',
      minHeight: 30,
    },
  },

  suggestions: {
    list: {
      backgroundColor: 'white',
      border: '1px solid rgba(0,0,0,0.15)',
      fontSize: 16,
    },
    item: {
      padding: '5px 15px',
      borderBottom: '1px solid rgba(0,0,0,0.15)',
      '&focused': {
        backgroundColor: '#cee4e5',
      },
    },
  },
};

Observed behaviour:
3 important bugs

  1. Sometimes first mention change a position
  2. Second mention stick to the text-area, became fixed on area while scrolling, break his position on the text
  3. Sometimes (depend on place of mention and length of it), the same text is visible behind mention, that is not acceptable.
    dasds2312

Expected behaviour:
I use this library for important feature of my client and expect that I don't get these UI bugs, because it breaks user experience.
Also, I am attaching test video with bugs.

Screen.Recording.2023-04-21.at.13.59.22.mov
@rostyslavDoskochynskiy rostyslavDoskochynskiy changed the title When use text When use scrollable mention text-area and add multiple texts, mention is fixed on the area while scrolling and break user interface Apr 21, 2023
@rostyslavDoskochynskiy rostyslavDoskochynskiy changed the title When use scrollable mention text-area and add multiple texts, mention is fixed on the area while scrolling and break user interface When use scrollable mention text-area and add multiple texts, mention is fixed on the area while scrolling and breaks user interface Apr 21, 2023
@rostyslavDoskochynskiy rostyslavDoskochynskiy changed the title When use scrollable mention text-area and add multiple texts, mention is fixed on the area while scrolling and breaks user interface When use scrollable <MentionsInput> and add multiple texts, mention is fixed on the area while scrolling and breaks user interface Apr 21, 2023
@levanion
Copy link

Have you found a solution to this? I have a similar issue.

@levanion
Copy link

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