When a long enough fadeDuration is used for opening a modal, opening, closing, and then re-opening the dialog quickly enough can leave the dialog opened, but in an unblocked state. I added some console logging to illustrate the issue.
In a "normal" scenario where the dialog is manually opened and closed with enough time between calls to complete all callbacks, the event sequence looks like this:
in showDialog()
open() start
block() start
block() end
open() timer callback
show() start
show() end
in hideDialog()
close() start
unblock() start
unblock() end
hide() start
in before close handler
hide() end
close() end
But if the dialog is opened, closed, and then re-opened before the first fade animation has completed, the sequence looks like this:
in showDialog()
open() start
block() start
block() end
close() start
unblock() start
unblock() end
hide() start
in before close handler
hide() end
close() end
open() timer callback
show() start
show() end
In this state, the dialog is opened but not responsive to the default close handlers that are registered, and the page body is unblocked.
When a long enough fadeDuration is used for opening a modal, opening, closing, and then re-opening the dialog quickly enough can leave the dialog opened, but in an unblocked state. I added some console logging to illustrate the issue.
In a "normal" scenario where the dialog is manually opened and closed with enough time between calls to complete all callbacks, the event sequence looks like this:
in showDialog()
open() start
block() start
block() end
open() timer callback
show() start
show() end
in hideDialog()
close() start
unblock() start
unblock() end
hide() start
in before close handler
hide() end
close() end
But if the dialog is opened, closed, and then re-opened before the first fade animation has completed, the sequence looks like this:
in showDialog()
open() start
block() start
block() end
close() start
unblock() start
unblock() end
hide() start
in before close handler
hide() end
close() end
open() timer callback
show() start
show() end
In this state, the dialog is opened but not responsive to the default close handlers that are registered, and the page body is unblocked.