Skip to content

Loading…

closeOnSelect and multiple, invalid highlight offset after selecting first item #348

Closed
nineinchnick opened this Issue · 3 comments

3 participants

@nineinchnick

After selecting first item from list, hovering over items highlights items not under but below cursor.
That offset changes depending on the item number, smallest on top and bigger at the bottom of the list.

My options:

  • multiple: true
  • closeOnSelect: false,
  • width: 20em
  • ajax: with pagination
  • initSelection: with an ajax call
@nineinchnick

To be more clear, the item that was selected is removed from the list, but it's still included when calculating cursor position over the list.

@AndriKrist

One question: Are you binding the select2 plugin to hidden field ?

because this only happens when you bind it to hidden field.

In the function onSelect for multi in the js file, there is a if statement that only fires when this.select is true. If you comment out that statement leaving this.postprocessResults(); to run every time this offset will be fixed.

@ivaynberg ivaynberg closed this in a145378
@AndriKrist

This is still an issue in version 3.2 . The fix for this does seem to be lost

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.