Skip to content
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

Dropdown closes when click on scroll in IE11 #1020

Closed
tknysh opened this issue Jun 10, 2016 · 25 comments
Closed

Dropdown closes when click on scroll in IE11 #1020

tknysh opened this issue Jun 10, 2016 · 25 comments
Labels
issue/bug-unconfirmed Issues that describe a bug that hasn't been confirmed by a maintainer yet

Comments

@tknysh
Copy link

tknysh commented Jun 10, 2016

@acromarco
Copy link

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
Copy link

selectize is also affected by this IE11 bug and they have probably found a fix selectize/selectize.js#1004

@acromarco
Copy link

I wonder if this is already fixed with 2da6ff6 because adding tabIndex={-1} should fix it.

@sushant-at-nitor
Copy link

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 pushed a commit to sushant-at-nitor/react-select that referenced this issue Dec 1, 2017
sushant-at-nitor pushed a commit to sushant-at-nitor/react-select that referenced this issue Dec 1, 2017
sushant-at-nitor pushed a commit to sushant-at-nitor/react-select that referenced this issue Dec 1, 2017
sushant-at-nitor pushed a commit to sushant-at-nitor/react-select that referenced this issue Dec 4, 2017
sushant-at-nitor added a commit to sushant-at-nitor/react-select that referenced this issue Dec 5, 2017
* fix for issues JedWatson#1020 and JedWatson#2102

* updated test to fix test for input focus as componentDidUpdate would set the focus to input if the menu is open

* added tests for fix JedWatson#1020 and JedWatson#2102
sushant-at-nitor added a commit to sushant-at-nitor/react-select that referenced this issue Dec 12, 2017
* fix for issues JedWatson#1020 and JedWatson#2102

* updated test to fix test for input focus as componentDidUpdate would set the focus to input if the menu is open

* added tests for fix JedWatson#1020 and JedWatson#2102
@stephanebarbey
Copy link

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

@jojo-tutor
Copy link

jojo-tutor commented Feb 7, 2018

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

handleOnBlur() {
    const e = null
    throw e
}

@AO17
Copy link

AO17 commented Jul 31, 2018

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?

@maeln
Copy link

maeln commented Aug 2, 2018

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
Copy link

maeln commented Aug 3, 2018

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.

@AO17
Copy link

AO17 commented Aug 15, 2018

@JedWatson will this be fixed soon?

@rakid
Copy link
Contributor

rakid commented Aug 23, 2018

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
Copy link
Contributor

rakid commented Aug 25, 2018

@JedWatson any suggestions?

@madhan-dhamodaran
Copy link

@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

@ahce
Copy link

ahce commented Sep 21, 2018

@JedWatson @gwyneplaine
Please check this.

@blake59
Copy link

blake59 commented Oct 16, 2018

Any update on this?

@ihor
Copy link

ihor commented Oct 23, 2018

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

@igorkaine
Copy link

+1

@mtunski
Copy link

mtunski commented Nov 19, 2018

+1

@acromarco
Copy link

acromarco commented Dec 3, 2018

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

@MaximeNoulin
Copy link

It seems that it (v2.1.2 #3013 ) fixed the sync Select but not the Async one, someone would have any idea why?

@aviranmz
Copy link

aviranmz commented May 4, 2020

version 2.4.4 still have the same issue in IE11 -> when the list is open and you try to click on the croll the menu is close - i cant upgrade to v3 - any solution?

@bladey bladey added the issue/bug-unconfirmed Issues that describe a bug that hasn't been confirmed by a maintainer yet label Jun 3, 2020
@bladey
Copy link
Contributor

bladey commented Jun 5, 2020

Hello -

In an effort to sustain the react-select project going forward, we're closing issues that appear to have been resolved via community comments or issues that are now redundant based on their age.

We understand this might be inconvenient but in the best interest of supporting the broader community we have to direct our efforts towards the current major version.

However, if you feel this issue is still relevant and you'd like us to review it - please leave a comment and we'll do our best to get back to you!

@MaximeNoulin and @aviranmz feel free to open up a new issue if it is still a problem, however note we are focusing on v3 as mentioned above.

@bladey bladey closed this as completed Jun 5, 2020
@David-moonsite
Copy link

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

handleOnBlur() {
    const e = null
    throw e
}

Works for me ,
now dropdown doesn't close when I click outside the dropdown

@Spomsoree
Copy link

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

handleOnBlur() {
    const e = null
    throw e
}

This worked for me on version 4.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/bug-unconfirmed Issues that describe a bug that hasn't been confirmed by a maintainer yet
Projects
None yet
Development

No branches or pull requests