Panel: panelclose event does not work

Fixes gh-7058