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
i read your code and i have some questions.
1: if the ouside element make a event stopPropagation, your code maybe can not work
2: addEventListener too much
The text was updated successfully, but these errors were encountered:
You are correct regarding the stopPropagation, and this is exactly why it's recommended not to use stopPropagation unless you know exactly what you are doing.
Regarding event listeners, alternative to this is to use a custom event emitter, and to have a single event listener on the document root that would notify all custom listeners. But I'm not sure this would significantly improve performance.
i read your code and i have some questions.
1: if the ouside element make a event stopPropagation, your code maybe can not work
2: addEventListener too much
The text was updated successfully, but these errors were encountered: