Skip to content

[Bug]: Strange behavior using tab #940

@toschispaggiari

Description

@toschispaggiari

Bug description

Hello,
I'm using Tom Select with an input select and the following options:

new TomSelect("#select-state",{ plugins: ['remove_button'], create: true, selectOnTab: true });

But when I select an option, after some digits, using tab, it adds the selected option and an additional option with the searched term.

Registrazione.dello.schermo.2025-09-08.105044.mp4

Expected behavior

The expected behavior should be only the selected option

Steps to reproduce

  1. Go to https://tom-select.js.org/examples/
  2. Go to <select multiple> example
  3. Click on "Edit" then "CodePen"
  4. On CodePen edit the JS with the following code
    new TomSelect("#select-state",{ plugins: ['remove_button'], create: true, selectOnTab: true, });
  5. Start to digit (for example: "Ari")
  6. Press tab button

Additional context

  • OS: Windows 11
  • Browser: Mozilla Firefox
  • Version: 142.0.1 (64 bit)
  • Device: PC

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions