Created by: cvrebert
Fixes #12364 (closed)? I admit this is not my forte, but this explanation for the cause of the bug seems to make sense, and the new unit tests pass, so...
- register the callback before invoking the toggling
- listen for
hiddeninstead ofhide - account for the possibility of the associated
showevent being preventDefault-ed
Adds relevant unit tests.
To: @fat for review