Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix modal dialog callback being called multiple times #2182

Merged
merged 4 commits into from
Jul 17, 2019

Conversation

yann300
Copy link
Collaborator

@yann300 yann300 commented Jul 11, 2019

When the modal closes, we need to remove the DOM element.
If not, we create a new EventListener associated with the modal each time the modal shows up.
And basically when the user Cancel the modal, all the previous callback where the modal was used get called.
That's pretty critical

@yann300 yann300 requested review from LianaHus and ryestew July 11, 2019 07:43
@yann300
Copy link
Collaborator Author

yann300 commented Jul 11, 2019

for reproducing:

  • run remixd, accept the connection.
  • right click on any file (from the browser explorer for instance) for deletion
  • when the modal shows up, click outside
  • result: the remixd connection get closed

@yann300 yann300 requested a review from LianaHus July 15, 2019 16:00
When the modal closes, we need to remove the DOM element. 
If not, we create a new EventListener associated with the modal each time the modal shows up.
And basically when the user `Cancel` the modal, all the previous callback where the modal was used get called.
That's pretty critical
@LianaHus LianaHus merged commit 0cfd5ab into master Jul 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants