react-typeahead-component icon indicating copy to clipboard operation
react-typeahead-component copied to clipboard

IE not firing onOptionClick()

Open kylehood opened this issue 10 years ago • 5 comments

I have been running into an issue where onOptionClick() will not fire in Internet Explorer. I think it is an issue with the handleWindowClose event getting fired when it shouldn't be.

I think the culprit is in typehead.js:103

addEvent('focus', handleWindowClose, true);

From there, moving down to the handleWindowClose() function, It looks like the event target is the entire window, not the option I just clicked.

Setting capture to false on line 103 seems to fix the issue. I believe the root cause is that the bubbling causes the focus on the window first instead of the option actually clicked. Therefor, the dropdown just closes without triggering an onOptionClick.

Any thoughts on this?

kylehood avatar Aug 21 '15 19:08 kylehood

@kylehood Thanks for reporting the issue. What version of IE is this happening in?

ezequiel avatar Aug 21 '15 19:08 ezequiel

@ezequiel Definitely in IE10, and it looks like it is behaving similarly in IE9 as well.

kylehood avatar Aug 21 '15 20:08 kylehood

:+1: although I don't think this is IE specific. I was having same problem in Chrome, looked here, commented out that line and it works now.

slobdell avatar Oct 11 '15 19:10 slobdell

@ezequiel Having this issue on Chrome, does not appear to be IE specific

Fireworks avatar Nov 10 '15 17:11 Fireworks

I'm having this issue in IE 11.

meriloi avatar Jan 10 '16 13:01 meriloi