Dock open/close event handling

I currently have two views on the bottom dock of my page:

  • View A, always visible, with no handle
  • View B, visible on demand, initially hidden, with a handle to bring up the view

My problem is that whenever I open/close View B, I am unable to show View A again, since I do not want a handle for View A. I would like these two views to work in a way in which whenever the “on demand” view closes, the “always visible” view re-appears.

What I would like to do is to be able to catch the event of View B being hidden/closed, so then I can trigger View A to show/open again. However I have been unsuccessful in finding any events/scripting that would allow me to do this.

Any help with is would be greatly appreciated.
Thanks!