Skip to content

Autocomplete: every second click highlights the fields content #1733

Open
@DonCamillo11

Description

@DonCamillo11

Flux version

v2.2.1

Livewire version

v3.6.3

Tailwind version

v4.1.10

Browser and Operating System

Safari on macOS

What is the problem?

There seems to be a strange behaviour in the autocomplete input. To exit the input field a second click outside the field is necessary because the first click highlights the entire text. This means that if the cursor is in the field and you want to press a submit button, this click is not accepted but the entire content is selected. The same applies if you want to move the cursor to a different position. So, every second click highlights the entire text.

Edit: OK, as I understand, this happens because the dropdown closes first. But when you click outside, both should happen: the dropdown closes and the focus moves away from the field. It's also irritating if you want to move the cursor to a different position to change the text. This example works as I would expect: https://www.w3schools.com/howto/howto_js_autocomplete.asp.

Bildschirmaufnahme.2025-06-26.um.15.10.12.mov

Code snippets

You can try the code from the docs https://fluxui.dev/components/autocomplete

How do you expect it to work?

One click inside the field should set the cursor to the desired position and a click outside should remove the focus.

Please confirm (incomplete submissions will not be addressed)

  • I have provided easy and step-by-step instructions to reproduce the bug.
  • I have provided code samples as text and NOT images.
  • I understand my bug report will be closed if I haven't met the criteria above.

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