To avoid some asserts, wxWebView should use Connect and Disconnect to register for popup menu events only when a context menu is visible. It also needs to release any mouse capture it has on destruction.
Created attachment 42496 [details] fixes mouse event problems
Landed in r50522, thanks!