FIX: Clicking on another widget should not prevent clickOutside

This commit is contained in:
Robin Ward 2016-04-07 16:10:39 -04:00
parent 9d8db11cf3
commit 71ef6ea518
1 changed files with 3 additions and 2 deletions

View File

@ -42,7 +42,8 @@ WidgetClickHook.setupDocumentCallback = function() {
while (node) { while (node) {
const widget = node[CLICK_ATTRIBUTE_NAME]; const widget = node[CLICK_ATTRIBUTE_NAME];
if (widget) { if (widget) {
return widget.rerenderResult(() => widget.click(e)); widget.rerenderResult(() => widget.click(e));
break;
} }
node = node.parentNode; node = node.parentNode;
} }
@ -53,7 +54,7 @@ WidgetClickHook.setupDocumentCallback = function() {
if (outNode.contains(node)) { return; } if (outNode.contains(node)) { return; }
const widget = outNode[CLICK_OUTSIDE_ATTRIBUTE_NAME]; const widget = outNode[CLICK_OUTSIDE_ATTRIBUTE_NAME];
if (widget) { if (widget) {
return widget.clickOutside(e); widget.clickOutside(e);
} }
}); });
}); });