What a Second Click Should Do While a Dialog Is Closing

A CoreUI Drawer with filters, half faded and sliding out to the right on a purple gradient, while a mouse pointer clicks its Filters button again

A user opens a filters panel, changes their mind and clicks the Filters button to close it. The panel starts to slide out, and halfway through they realise they wanted one more filter after all, so they click the button again.

What should happen? The panel is still on screen, still in the DOM, still open as far as the browser is concerned. It is just on its way out. Many dialog implementations drop that second click, so the panel finishes closing and the user has to wait and click a third time. This guide shows how to reopen a dialog during its closing animation instead, and the details that make that harder than it looks.

Read More…
Subscribe to our newsletter
Get early information about new products, product updates and blog posts.