8000 Cannot focus programmatically, because inputRef becomes null after typing something into the MentionInput · Issue #747 · signavio/react-mentions · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Cannot focus programmatically, because inputRef becomes null after typing something into the MentionInput #747
Open
@torlenor

Description

@torlenor

Steps to reproduce:

  1. Open the demo locally or via https://react-mentions.vercel.app/
  2. Go to Advanced options
  3. Click somewhere so that the MentionsInput is not focused
  4. Click on the button "focus programmatically"
  5. It works
  6. Now type something in the text field, click outside so that it is unfocused
  7. Click on the button "focus programmatically"
  8. It fails until you reload the page.

Expected behaviour:

Focus to work after you typed something in the text field

Observed behaviour:

Fails as soon as something was typed. The inputEl.current becomes null after you typed something.

react-mentions-focus_programmatically_fails_after_typing

Workaround:

Couldn't figure one out

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0