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

Multiple select erases text when trying reposition cursor with mouse #3517

Closed
rywall opened this issue Jun 23, 2015 · 9 comments · Fixed by #5580
Closed

Multiple select erases text when trying reposition cursor with mouse #3517

rywall opened this issue Jun 23, 2015 · 9 comments · Fixed by #5580

Comments

@rywall
Copy link
Contributor

rywall commented Jun 23, 2015

To repro:

  1. Go to https://select2.github.io/examples.html#multiple
  2. Type "Hello World" in the multiple select
  3. Try to use your mouse to reposition the cursor between 'Hello' and 'World'
  4. Notice the whole phrase is deleted.
@kevin-brown
Copy link
Member

It looks like the click is propagating up to the container is causing it to toggle.

@tholu
Copy link

tholu commented Sep 6, 2017

@kevin-brown This bug is really annoying. Since you seem to have already done some investigation on this, is there an easy fix? Will you accept a PR for a fix?

@stale
Copy link

stale bot commented Mar 13, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the status: stale label Mar 13, 2019
@tholu
Copy link

tholu commented Mar 13, 2019

As this is a confirmed bug, I think the issue should not be closed.

@stale stale bot removed the status: stale label Mar 13, 2019
@stale
Copy link

stale bot commented May 12, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the status: stale label May 12, 2019
@kevin-brown
Copy link
Member

I'm pretty sure there's a duplicate of this ticket in this tracker, since I remember seeing something more recently about it.

This is still a bug though.

@stale stale bot removed the status: stale label May 15, 2019
@stale
Copy link

stale bot commented Jul 14, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the status: stale label Jul 14, 2019
@rywall
Copy link
Contributor Author

rywall commented Jul 15, 2019

Still a bug. Just repro'ed this using the steps in the first comment.

@stale stale bot removed the status: stale label Jul 15, 2019
@blikblum
Copy link
Contributor

Probably fixed by #5551

kevin-brown added a commit that referenced this issue Jul 21, 2019
This fixes a long-standing bug where if you tried to click in the
search box for a multiple select while there was text in it, the
dropdown would close and the text would be cleared. This caused
many unexpected issues, because it meant that you could only use
your keyboard to edit text within the search box.

This will still clear out the search field if you click within the
area of the selection which is not the search field. I'm not sure
if that is also unexpected behaviour, so for now I am going to
maintain it.

Fixes #3517
Fixes #3808
Fixes #5491
Closes #5551
kevin-brown added a commit that referenced this issue Jul 21, 2019
This fixes a long-standing bug where if you tried to click in the
search box for a multiple select while there was text in it, the
dropdown would close and the text would be cleared. This caused
many unexpected issues, because it meant that you could only use
your keyboard to edit text within the search box.

This will still clear out the search field if you click within the
area of the selection which is not the search field. I'm not sure
if that is also unexpected behaviour, so for now I am going to
maintain it.

Fixes #3517
Fixes #3808
Fixes #5491
Closes #5551
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants