Skip to content

Conversation

rywall
Copy link
Contributor

@rywall rywall commented May 22, 2015

Otherwise the input isn't sized correctly.

Otherwise the input isn't sized correctly.
@rywall
Copy link
Contributor Author

rywall commented May 27, 2015

@kevin-brown to replicate this:

  1. Go to: http://jsfiddle.net/1o04w80r/
  2. Type "al".
  3. Press Enter.
  4. Press Delete.
  5. Notice the input is sized incorrectly.

@kevin-brown kevin-brown added this to the 4.0.1 milestone May 28, 2015
@kevin-brown
Copy link
Member

I need to do some more testing with this, and figure out if there are any related issues that should be handled as well.

@rywall
Copy link
Contributor Author

rywall commented Jun 23, 2015

Will fix #3297

@King2500
Copy link

👍

2 similar comments
@althaus
Copy link

althaus commented Oct 26, 2015

👍

@robikovacs
Copy link

👍

tzellman pushed a commit to tzellman/select2 that referenced this pull request Feb 2, 2016
This fixes a previous bug with the backspace handler on the multiple
select search box where unselecting a choice through the keyboard would
not properly size the search box. As a result, most of the text would be
cut off and it was very clear that there was an issue.

In addition, a blank space was automatically being added to the end of
the search query. This blank space would not be removed at all, so the
user had to manually remove it.

Additionally, a query would be triggered for the last used search term
instead of the new search term that would be loaded in. This caused
incorrect results to be displayed most of the time.

All of these issues have been fixed by triggering a new search query
after an option has been removed through the keyboard. This will resize
the search box automatically, which fixes the main issue, and it will
trigger a search with the correct query.

This closes select2#3297
This closes select2#3398
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants