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
It would be nice in terms of performance gain if it would be possibile to test when a click is made from inside the target component or not. I mean, now every time a click is made outside target element then the click away function is executed (even if i am click on some other elements).
My suggestion is to check the previous click and the current click and see if the previous click is made inside the target element: If yes, the user is in the target element and with the current click he just clicks away. If no, the user clicked on some other elements and is currently clicking on some other elements (different from the target element) and no click away function should be executed.
The text was updated successfully, but these errors were encountered:
It would be nice in terms of performance gain if it would be possibile to test when a click is made from inside the target component or not. I mean, now every time a click is made outside target element then the click away function is executed (even if i am click on some other elements).
My suggestion is to check the previous click and the current click and see if the previous click is made inside the target element: If yes, the user is in the target element and with the current click he just clicks away. If no, the user clicked on some other elements and is currently clicking on some other elements (different from the target element) and no click away function should be executed.
The text was updated successfully, but these errors were encountered: