Ventus
Ventus copied to clipboard
Multiple close/open support
Hello,
The following:
myWindow.close();
myWindow.open();
during the same JavaScript frame breaks the behavior and the window can be lost forever.
This PR prevents such issue.
Let me know what do you think
I understand the issue here, but I'm not sure if this is the right solution. Generally, this only happens when programmatically you close and then open a window, which occurs so fast that the animationEnd event handler of the open operation is executed before the window is even closed. I don't clearly see the use case however, I would approach this by either:
- ignoring any operation if the previous animation has not ended.
- enqueuing the operation and execute it whenever the animation has ended by means of promises.