Popup: Fixes closing the popup unexpectedly by race conditions. #668
rxaviers wants to merge 4 commits into jquery:menubarfrom rxaviers:menubar
Commits on May 26, 2012
… unexpectedly by race conditions. - A focusout followed by a focusin sometimes trigger events in reverse order, but should not close the popup nevertheless. Or a click-in-the-popup followed by a focusout should also avoid closing it unexpectedly; - _closeTry and _closeVet work together to close the popup, but making sure no other event vets it;
…triggered when the mouse button is released, which virtually always exceeds _closeTry delay, leading to erroneous popup close.
…estroy, it doesn't unbind other popup instances.
…aster since the _closeTry and _closeVet approach is working smooth.