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
Thanks for the pointers. Wow that's a surprisingly tricky issue for something that seems so simple!
I picked up a few tips (such as tabindex="-1") from your comment, but had trouble implementing your suggestion because I could not get the document.activeElement to be anything other than the <body>. Maybe that's because I just use an <ul> for my popover list rather than a <select>?
In the end I achieved what seems to be a working result by setting mouseover and mouseout handlers on the popover div, which set a mouseIsOverSuggestions flag to true and false respectively.
Then the blur handler on the input checks this flag before hiding the popover.
Currently the twitter hashtag popover stays open even when the input is blurred. I've implemented a solid menu blur by:
document.activeElement
is the either the input, the menu, or a child of the menuYou can't do a typical "outerclick" because:
<select>
tags don't propogate events up to the body.The text was updated successfully, but these errors were encountered: