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

auto close dropdownlist when onSelect by mouse click #36

Open
DoraemonYu opened this issue Dec 27, 2016 · 1 comment · May be fixed by #95
Open

auto close dropdownlist when onSelect by mouse click #36

DoraemonYu opened this issue Dec 27, 2016 · 1 comment · May be fixed by #95

Comments

@DoraemonYu
Copy link

DoraemonYu commented Dec 27, 2016

o(∩_∩)o Hello.

I found this problem when after I selected one opinion by mouse click, the dropdownlist would immediately show again.
However,if I selected the opinion by keyboard enter, it doesn't have this problem.
(target input still own FOCUS, but the former keep shown dropdownlist but the latter didn't. )

Then I compare the javascript logic between keydownHandler and mousedown ,
the former to close the dropdownlist by use: setTimeout(function(){ that.sc.style.display = 'none'; }, 20);
the latter to close the dropdownlist by use: that.sc.style.display = 'none';

So, I tried to modify the code to setTimeout(function(){ that.sc.style.display = 'none'; }, 200); in the mousedown handler , the problem I found would gone :)

BTW, as you notice ,Mmm....
I use 200ms instead of 20ms, because I was not sure why 20ms cannot fixed this issue but 200ms okay in mouse event. Does anybody have idea here?

Thanks so much :)

@TheCrimsonKing92
Copy link

Hi, not sure if you're still experiencing the issue. Can you provide a jsFiddle or similar that reproduces the problem?

@cyfung1031 cyfung1031 linked a pull request Oct 6, 2023 that will close this issue
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.

2 participants