-
Notifications
You must be signed in to change notification settings - Fork 19
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
Select List Jumping to The Top When Clicking On Scrolled Items #70
Comments
I'm afraid that's a bug in the Select2 jQuery plugin. There's a hacky fix to prevent the jump. Execute the following JavaScript code on page load: var scrollTop;
$('#P10_MY_SELECT2_ITEM').on('select2:selecting select2:unselecting', function(event) {
var $pr = $('#'+event.params.args.data._resultId).parent();
scrollTop = $pr.prop('scrollTop');
});
$('#P10_MY_SELECT2_ITEM').on('select2:select select2:unselect', function(event) {
var $pr = $('#'+event.params.data._resultId).parent();
$pr.prop('scrollTop', scrollTop);
}); Replace P10_MY_SELECT2_ITEM with the name of your Select2 page item. |
just tested, it still happens |
sorry for messaging again, any updates? |
Sorry for the delay. |
Just for reference, this is ALSO happening with non multiple select drop downs. |
I've gone through the entire source code over and over again. Modified it in several places. I can't find a workaround @shawty |
click event is not working in apex2 plugin |
Initially I would like to thank you for your contribution.
I have discovered an issue and it happens when I click on List Items below the list, it jumps up to the top of the list as you can see in the gif below :
The text was updated successfully, but these errors were encountered: