mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Clicking on another widget should not prevent clickOutside
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user