You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
auto close dropdownlist when onSelect by mouse click #36
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?
Activity
TheCrimsonKing92 commentedon Mar 12, 2017
Hi, not sure if you're still experiencing the issue. Can you provide a jsFiddle or similar that reproduces the problem?