Skip to content

Broken focus after upgrading to jQuery 3.6.0 #3137

Open

Description

@michalfordonski

Hello, after updating jQuery to 3.6.0, focus does not work after opening and you have to manually click on the search box.

Activity

  1. michalfordonski commented on Feb 23, 2023

    @michalfordonski
    Author

    Due to the lack of response and free time, I decided to look for the cause of the problem myself.
    The solution in my case was to comment out 2 lines. Based on version 1.8.7 these are lines 1002 and 1060 containing:

    1002:
    this.search_field.focus();
    1060:
    return this.search_field.focus();

    After commenting them out, focus works fine.

    A similar fragment is also found in lines 929 and 1111, but I haven't noticed that 929 and 1111 are blocking the focus.

    Of course, treat it as a temporary solution and when an official new version that fixes the problem appears, then update chosen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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