Skip to content
Snippets Groups Projects
Commit fc05b8a2 authored by Tom Robinson's avatar Tom Robinson
Browse files

Fix clickoutside wrpaper issue with popover being removed from the stack too...

Fix clickoutside wrpaper issue with popover being removed from the stack too soon, causing parent modal to close as well
parent 53068be3
No related branches found
No related tags found
No related merge requests found
......@@ -39,11 +39,14 @@ export default class OnClickOutsideWrapper extends Component {
window.removeEventListener("click", this._handleClick, true);
clearTimeout(this._timeout);
// remove popover from the stack
var index = popoverStack.indexOf(this);
if (index >= 0) {
popoverStack.splice(index, 1);
}
// remove from the stack after a delay, if it is removed through some other
// means this will happen too early causing parent modal to close
setTimeout(() => {
var index = popoverStack.indexOf(this);
if (index >= 0) {
popoverStack.splice(index, 1);
}
}, 0);
}
_handleClick = (e) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment