…de. Fixes #5111.
The code was added because close buttons still had active state when you closed and re-opened a dialog (#1839). I tested without the code and that issue doesn't occur anymore (nav takes care of removing active state).