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]: Dropdown input plugin puts id on wrong element #679

Open
scott-8 opened this issue Jan 11, 2024 · 2 comments
Open

[Bug]: Dropdown input plugin puts id on wrong element #679

scott-8 opened this issue Jan 11, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@scott-8
Copy link

scott-8 commented Jan 11, 2024

Bug description

When the dropdown input plugin is used, it puts the label on the ts-control div rather than the input field. This causes issues when the field is labelled, as divs aren't allowed to have labels.

Expected behavior

I would expect the id (for example, ex-dropdown-input-ts-control) to be on the input field.

Steps to reproduce

  1. Go to the example for dropdown input in the docs (https://tom-select.js.org/plugins/).
  2. Inspect element.
  3. The id ex-dropdown-input-ts-control is on the ts-control div, rather than the input in the div.
  4. For the rest of the examples, the id is on the input as it should be.

Additional context

  • OS: Windows
  • Browser: Chrome
@scott-8 scott-8 added the bug Something isn't working label Jan 11, 2024
@Ikpixel
Copy link

Ikpixel commented Jan 31, 2024

@oyejorge Hope that this will be fix ASAP.

I have a label with for="example" and the id="example" is set to the div with class ts-control instead of the input in it.

@JoackimPennerup
Copy link

I think the underlying issue is the same that I reported on #672 (self.focus_node set to the wrong element). There are more issues with dropdown input regarding focus. I'll look into and see if I can create a PR for both #672 and #679.

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

3 participants