react-select icon indicating copy to clipboard operation
react-select copied to clipboard

Dropdown closes when click on scroll in IE11

Open tknysh opened this issue 10 years ago • 25 comments

tknysh avatar Jun 10 '16 15:06 tknysh

Potential regression of #495?

Related issues:

  • #848
  • #846

twschiller avatar Oct 18 '17 15:10 twschiller

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.

acromarco avatar Oct 24 '17 14:10 acromarco

selectize is also affected by this IE11 bug and they have probably found a fix https://github.com/selectize/selectize.js/issues/1004

acromarco avatar Oct 25 '17 13:10 acromarco

I wonder if this is already fixed with https://github.com/JedWatson/react-select/commit/2da6ff6a352c8720fe59ca037524dbff9109af96 because adding tabIndex={-1} should fix it.

acromarco avatar Oct 26 '17 09:10 acromarco

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;
}

sushant-at-nitor avatar Nov 30 '17 10:11 sushant-at-nitor

Is this issue still open? (or any chance that the fix by sushant-at-nitor gets integrated?)

stephanebarbey avatar Jan 26 '18 15:01 stephanebarbey

just add this "onBlur" handler to the props of Select:

handleOnBlur() {
    const e = null
    throw e
}

jojo-tutor avatar Feb 07 '18 00:02 jojo-tutor

if this has been fixed (see merge above):

  1. Why is this issue still open?
  2. I still have the same issue, if the fix has been merged, why is the bug still occuring?

AO17 avatar Jul 31 '18 13:07 AO17

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.

maeln avatar Aug 02 '18 14:08 maeln

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.

maeln avatar Aug 03 '18 12:08 maeln

@JedWatson will this be fixed soon?

AO17 avatar Aug 15 '18 13:08 AO17

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.

rakid avatar Aug 23 '18 07:08 rakid

@JedWatson any suggestions?

rakid avatar Aug 25 '18 16:08 rakid

@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

madhan-dhamodaran avatar Sep 12 '18 19:09 madhan-dhamodaran

@JedWatson @gwyneplaine Please check this.

ahce avatar Sep 21 '18 17:09 ahce

Any update on this?

blake59 avatar Oct 16 '18 13:10 blake59

Hey guys! Do you have any estimates when the fix will be released? Thanks!

ihor avatar Oct 23 '18 13:10 ihor

+1

igor-3que avatar Nov 08 '18 16:11 igor-3que

+1

mtunski avatar Nov 19 '18 10:11 mtunski

Should be fixed in v2.1.2 thanks to PR #3013

acromarco avatar Dec 03 '18 17:12 acromarco