Skip to content

Value being restored even when preserveInput is true #521

@berarma

Description

@berarma

I'm trying to handle the input contents and thus I'm setting preserveInput to true. I want to restore the input to a default value when no option is selected using my own blur handler, but the plugin gets in the way and restores the typed text after my code.

When preserveInput is true I think it's unnecessary to restore the input contents. Also, it can cause problems with other code trying to handle the input contents like in my case.

Steps to reproduce:

  • Initialize autocomplete input field with preserveInput=true.
  • Set a blur handler that changes the input value.
  • Type something in the input field without choosing any suggestion.
  • Click away from the field and see how the typed text remains instead of the value set in the blur handler.

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