react-overlays
Advanced tools
Comparing version 0.9.2 to 0.9.3
@@ -63,2 +63,6 @@ 'use strict'; | ||
_this.addEventListeners = function () { | ||
// Store the current event to avoid triggering handlers immediately | ||
// https://github.com/facebook/react/issues/20074 | ||
_this.currentEvent = window.event; | ||
var event = _this.props.event; | ||
@@ -97,2 +101,8 @@ | ||
_this.handleMouse = function (e) { | ||
// skip if this event is the same as the one running when we added the handlers | ||
if (e === _this.currentEvent) { | ||
_this.currentEvent = undefined; | ||
return; | ||
} | ||
if (!_this.preventMouseRootClose && _this.props.onRootClose) { | ||
@@ -104,2 +114,8 @@ _this.props.onRootClose(e); | ||
_this.handleKeyUp = function (e) { | ||
// skip if this event is the same as the one running when we added the handlers | ||
if (e === _this.currentEvent) { | ||
_this.currentEvent = undefined; | ||
return; | ||
} | ||
if (e.keyCode === escapeKeyCode && _this.props.onRootClose) { | ||
@@ -106,0 +122,0 @@ _this.props.onRootClose(e); |
{ | ||
"name": "react-overlays", | ||
"version": "0.9.2", | ||
"version": "0.9.3", | ||
"description": "Utilities for creating robust overlay components", | ||
@@ -5,0 +5,0 @@ "author": "Jason Quense <monastic.panic@gmail.com>", |
99828
2004