We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
While the select is disabled it's still possible to select an option IF the spacebar is hit with the select being in focus.
This will happen with either single or multiple select https://jsfiddle.net/William_/9pqh3m63/1/
Steps to reproduce:
This will open the select and allow you to select an option.
Select2 versions used: From 4.05 to 4.0.6-rc.1 Version used on fiddle: 4.0.5-rc.0
Browsers used: Firefox 57.0.1 (64-bit) Chrome Version 62.0.3202.94 (64 bits)
Operation system: Windows 10 Build 1709
DISCLAIMER: I'm NOT the original reporter of the bug this was found at SO question
There's a workaround provided in one of the answers but for it to work it must be used the select2.full.min
In case of the link being dead answer provided here:
$('#select2').select2({ containerCssClass: 'mysel-con', placeholder: 'Select an option' }); $('#select2Multiple').select2({ placeholder: 'Select an option', }); $('#disableBtn').on('click', function() { $('#select2').select2('enable', false); $('#select2Multiple').select2('enable', false); $('.mysel-con').css('pointer-events', 'none'); }); $('#enableBtn').on('click', function() { $('#select2').select2('enable'); $('#select2Multiple').select2('enable'); $('.mysel-con').css('pointer-events'); });
Thanks to @beaver71 for the workaround.
The text was updated successfully, but these errors were encountered:
I believe this is a duplicate of #4695 (or at the very least, likely the same underlying problem).
Sorry, something went wrong.
No branches or pull requests
While the select is disabled it's still possible to select an option IF the spacebar is hit with the select being in focus.
This will happen with either single or multiple select
https://jsfiddle.net/William_/9pqh3m63/1/
Steps to reproduce:
This will open the select and allow you to select an option.
Select2 versions used:
From 4.05 to 4.0.6-rc.1
Version used on fiddle: 4.0.5-rc.0
Browsers used:
Firefox 57.0.1 (64-bit)
Chrome Version 62.0.3202.94 (64 bits)
Operation system: Windows 10 Build 1709
DISCLAIMER: I'm NOT the original reporter of the bug this was found at SO question
There's a workaround provided in one of the answers but for it to work it must be used the select2.full.min
In case of the link being dead answer provided here:
Thanks to @beaver71 for the workaround.
The text was updated successfully, but these errors were encountered: