doc: close event is always emitted
Merge pull request #1190 from LinusU/patch-1

doc: close event is always emitted