Fixed: CPPopover not closing in some browsers

In browsers without support for _DOMElement.removeEventListener CPPopover
throws an exception when closing, and the popover is not removed. This fix
checks for support implicitly using the _browserAnimates variable.
This commit is contained in:
Ashley Williams
2014-03-23 21:05:56 -07:00
parent 2a78da6d07
commit be3c4abbce
+4 -1
View File
@@ -588,7 +588,10 @@ var _CPPopoverWindow_shouldClose_ = 1 << 4,
{
// Make absolutely sure no dangling event listeners are left
#if PLATFORM(DOM)
_DOMElement.removeEventListener(CPBrowserStyleProperty("transitionend"), _orderOutTransitionFunction, YES);
if (_animates && _browserAnimates)
{
_DOMElement.removeEventListener(CPBrowserStyleProperty("transitionend"), _orderOutTransitionFunction, YES);
}
#endif
[self _removeFrameObserver];