You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 16, 2021. It is now read-only.
Currently, I think Node.contains is used for detecting if the click happened outside of the element. I have a case where the element within the directive's host is replaced after the click. This means that the clicked element is no longer a descendant of the host and the click is treated as a click outside.
There may be another way and I may be missing something, but I think this would be a solution:
Add an option where the target of the click would be obtained like so: document.elementFromPoint(event.clientX, event.clientY);
instead of like so: event.target
This would check the element currently under the cursor instead of the one that was there when the click occurred.
The text was updated successfully, but these errors were encountered:
Currently, I think Node.contains is used for detecting if the click happened outside of the element. I have a case where the element within the directive's host is replaced after the click. This means that the clicked element is no longer a descendant of the host and the click is treated as a click outside.
There may be another way and I may be missing something, but I think this would be a solution:
Add an option where the target of the click would be obtained like so:
document.elementFromPoint(event.clientX, event.clientY);
instead of like so:
event.target
This would check the element currently under the cursor instead of the one that was there when the click occurred.
The text was updated successfully, but these errors were encountered: