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

IE11: Dropdown re-opens after selecting item #621

Closed
sebastianhaberey opened this issue Aug 8, 2019 · 5 comments
Closed

IE11: Dropdown re-opens after selecting item #621

sebastianhaberey opened this issue Aug 8, 2019 · 5 comments

Comments

@sebastianhaberey
Copy link

Happens randomly but frequently. Easy to replicate. Recorded directly from https://joshuajohnson.co.uk/Choices/:

test

Where should we start looking for the cause? Any pointers? Regards,

Sebastian

@sebastianhaberey
Copy link
Author

After some debugging I found that _onFocus() seems to be the cause here. After the item is selected by the user, the dropdown is hidden. Then, there's an _onFocus() call which in turn calls showDropdown().

I don't know why _onFocus() would be called here. My guess is that the component loses focus for an instant and gains it again - some IE quirk maybe?

We could probably go ahead and disable the "show dropdown on focus" functionality programmatically (we don't really need it), but if anyone can think of a better, more general idea, that'd be great!

@sebastianhaberey
Copy link
Author

The root cause seems to be a bugfix (29ab3ca)
that fixed an IE11 issue where clicking on a scrollbar in the dropdown would close the dropdown instantly. I guess this issue is a side effect of this bugfix.

I believe the pull request should fix the side effect by making sure the mouse is on the scrollbar as a precondition for the fix.

sebastianhaberey pushed a commit to sebastianhaberey/Choices that referenced this issue Oct 27, 2019
@hog-seruj
Copy link

Styles are brocked on IE11 as well.
1574447251247

@jshjohnson
Copy link
Collaborator

Styles are brocked on IE11 as well.

This issue in particular has been resolved

@sephyzeonas
Copy link

Hello Community,
I experienced the behavior of the original post on "version": "9.0.1" on Chrome as well.
MacOS high Sierra Version 10.13.4,
Chrome Version 81.0.4044.113 (Official Build) (64-Bit)

I recognized the behavior still just get's triggered on a regular mouse click if you click the same item which is the current chosen one. If you hold the left mouse button (mousedown) for like 0.25s longer than an actual mouse click, the dropdown is going to work like it is intended and the dropdown is closing.

I hope this information might help you to fix the issue.

Best regards

@mtriff mtriff closed this as completed Dec 21, 2021
@mtriff mtriff removed the pinned label Dec 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants