isic-archive icon indicating copy to clipboard operation
isic-archive copied to clipboard

Modal dialogs rendered in sequence may conflict

Open brianhelba opened this issue 8 years ago • 2 comments

When a new girder.confirm modal dialog is rendered immediately after annother is dismissed, we must wait for $('g-dialog-container'),on('hidden.bs.modal') to fire, or else the .modal-backgrop is not fully removed.

This should be fixed, so modals will wait for pending animations or remove old elements as soon as they render themselves.

brianhelba avatar Mar 21 '17 20:03 brianhelba

Although isic.showAlertDialog is smart enough to directly avoid this problem, it also has the sub-optimal behavior of not firing its callback until the CSS animation completes. Ideally, the callback can be fired immediately, and any subsequent (if it exists) modal will wait for the previous animation to complete before rendering itself.

brianhelba avatar Mar 21 '17 21:03 brianhelba

In Girder 2.0 I tested a case where the callback of a girder.confirm modal dialog calls girder.confirm to display another dialog and I don't see the same display issue that we saw in this plugin. I dug a bit but don't see what makes this behave differently. Still, we'll have to test once isic-archive uses Girder 2.0, and isic.showAlertDialog will likely need an update to remove its sub-optimal delay in calling the callback.

msmolens avatar Mar 23 '17 16:03 msmolens