We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 18d92e2 commit 57d181aCopy full SHA for 57d181a
client/modules/App/components/Overlay.jsx
@@ -33,10 +33,11 @@ class Overlay extends React.Component {
33
return;
34
}
35
36
- this.handleClickOutside();
+ this.handleClickOutside(e);
37
38
39
handleClickOutside() {
40
+ console.log(this.node);
41
this.close();
42
43
@@ -49,6 +50,10 @@ class Overlay extends React.Component {
49
50
51
52
close() {
53
+ // Only close if it is the last (and therefore the topmost overlay)
54
+ const overlays = document.getElementsByClassName('overlay');
55
+ if (this.node.parentElement.parentElement !== overlays[overlays.length - 1]) return;
56
+
57
if (!this.props.closeOverlay) {
58
browserHistory.push(this.props.previousPath);
59
} else {
0 commit comments