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

[Bug]: Incorrect behavior within a form with autocomplete (Chrome) #704

Open
ReadyCloudSuite opened this issue Mar 15, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@ReadyCloudSuite
Copy link

ReadyCloudSuite commented Mar 15, 2024

When the tom-select component is created from an input field that can be autocompleted using the browser's built-in autocomplete (for example, selecting a country), tom-select behaves incorrectly.

The following description is provided for the country selection element.

  • Upon initial form filling, the value is correctly populated but not automatically selected.

  • Then, when a value is selected, clearing the form does not erase the value.

    demo
    2024-03-15_13-55-16.mp4
  • If a value is selected and then another value is autocompleted, it is appended next to the previously selected value (presumably, it is inserted into the input located within the Tom-select component).
    Additionally, it seems that Chrome ignores the autocomplete="off" attribute of the input embedded in tom-select.

    demo
    2024-03-15_13-55-57.mp4

jfiddle - https://jsfiddle.net/cheack/eLmn5dp7/1/

I understand that there might be challenges in dealing with Chrome's behavior (such as ignoring autocomplete="off", tracking form clearing event). This issue is being raised in the hope that there are individuals with insights and expertise who can explore potential workaround solutions.

@ReadyCloudSuite ReadyCloudSuite added the bug Something isn't working label Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant