Skip to content

onBlur without adding tag #4

@webtweakers

Description

@webtweakers

Nice little tag input. I'm trying to use it in combination with an autocomplete script for tag suggestions. However, when selecting a tag from the suggestions, the onBlur event fires and adds the incomplete part of the tag as well.

As a local "fix" for this issue, I've changed the input.onblur function on line 223 to the following piece of code:

      input.onblur = () => {
        setFocus(false);
        setText("");
      };

Changing the source code is a bit hacky, so it would be nice if there was an option to deny tags to be added on blur.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions