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
Click on any button that opens a popup or a submit form such as #AddCardForm. A popup/form opens. Click on any part of the body, that is not a button. The popup/form is expected to be closed.
A simple dumb solution that I came up with is listening on the blur event, but it is bad, because clicking on buttons is also triggering a blur event.
The text was updated successfully, but these errors were encountered:
Yes, the popup system needs to be improved. I plan to make a general object that we can use more easily (there is a lot of duplicate code related to click management for instance). And there is also #54.
About the implementation we can simply add an event listener on the body that will close the popup. Then we add a click event on the popup and stop its propagation so that the event does not bubble up to the body tag.
Click on any button that opens a popup or a submit form such as
#AddCardForm
. A popup/form opens. Click on any part of the body, that is not a button. The popup/form is expected to be closed.A simple dumb solution that I came up with is listening on the
blur
event, but it is bad, because clicking on buttons is also triggering a blur event.The text was updated successfully, but these errors were encountered: