Skip to content

[bug] Text inputs in a sortable div can no longer be focused #2410

Closed

Description

@joeybab3

To Reproduce

  1. Click on a form input within a div that is draggable
  2. Focus is immediately removed.
  3. Opening inspect element shows that when the text field is clicked the element becomes draggable.

Expected behavior

In previous versions I was able to click to type in these forms and then drag elsewhere.

This issue is not present in 1.15.3

Information

Versions:
sortablejs = @latest(1.15.4)

Reproduction
https://jsbin.com/rukomad/1/edit?html,css,output

Activity

  1. trcat commented on Nov 26, 2024

    @trcat

    same problem

  2. trcat commented on Nov 26, 2024

    @trcat

    i use filter to expect input to fix this problem

  3. arsqu commented on Nov 27, 2024

    @arsqu
  4. owen-m1 commented on Nov 27, 2024

    @owen-m1
    Member

    Thank you for reporting, this is a byproduct of another fix that was necessary to prevent text from being selected during dragging. Please follow @arsqu's solution for a reliable fix. I will probably change the new behaviour to only occur during fallback to mitigate this problem.

  5. added a commit that references this issue on Nov 27, 2024
  6. added a commit that references this issue on Nov 27, 2024
  7. owen-m1 commented on Nov 27, 2024

    @owen-m1
    Member

    Please try 1.15.5 and let me know if it's working again

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions