Dropdown closes when click on scroll in IE11

Potential regression of #495?
Related issues:
- #848
- #846
According to my research, this bug (re-)appeared with IE11 in Win7 after this security update https://support.microsoft.com/en-us/help/4040685/cumulative-security-update-for-internet-explorer With the new IE11 version 11.0.9600.18816 this bug is reproducible, but everything worked fine with the older version 11.0.9600.17420.
selectize is also affected by this IE11 bug and they have probably found a fix https://github.com/selectize/selectize.js/issues/1004
I wonder if this is already fixed with https://github.com/JedWatson/react-select/commit/2da6ff6a352c8720fe59ca037524dbff9109af96 because adding tabIndex={-1} should fix it.
Code on this line should add one more condition to fix this issue.
if (this.menu && (this.menu === document.activeElement || this.menu.contains(document.activeElement))) {
document.activeElement.classList.contains(<configured class name for menu renderer>)
OR
Let this line decide whether to set new state to hide menu options or to continue to show them, stop further execution of code.
const result = this.props.onBlur(event);
if(result === false){
this.focus();
return;
}
Is this issue still open? (or any chance that the fix by sushant-at-nitor gets integrated?)
just add this "onBlur" handler to the props of Select:
handleOnBlur() {
const e = null
throw e
}
if this has been fixed (see merge above):
- Why is this issue still open?
- I still have the same issue, if the fix has been merged, why is the bug still occuring?
I can confirm that I have the same issue with the latest version of react-select. I guess there was a regression with the V2.
To expand on @jojo-tutor "fix-hack", you can do this if you still want your select to close when it lose focus:
onBlur={() => {
const focusedElement = document.activeElement
if (focusedElement.className.includes('<<your-select-class>>')) {
const e = null
throw e
}
}}
But it's a dirty hack, we should find a proper fix.
@JedWatson will this be fixed soon?
Confirm issue with the V2 (using v2.0.0-beta-7), and tested also with v2.0.0-master
Tested in the examples provided by react-select, same issue.
Hope it will be resolved soon.
@JedWatson any suggestions?
@JedWatson @james4388 @rakid ,
Any updates on @rakid 's merge? This is a blocker for me and I am in need of this for my project.
Please advise.
Thanks, MAdhan
@JedWatson @gwyneplaine Please check this.
Any update on this?
Hey guys! Do you have any estimates when the fix will be released? Thanks!
+1
+1
Should be fixed in v2.1.2 thanks to PR #3013