HTMLViewer Getting events when obscured

I’ve got an htmlviewer for a page using CSS to highlight rows on the htmlpage when the user moves the mouse. Pretty basic stuff.

I’ve got a listbox that overlays a part of the htmlviewer on occasion, think of it as a customized contextual menu that isn’t part of the htmlviewer.

My problem is that the the htmlviewer reacts to the mouse movements in the listbox.

Should not a control with focus (my listbox) on top of another control get the mouse movement, not the control under (the htmlviewer)?

All helpful suggestions appreciated!


The HTML Viewer is not a normal control (at least not on the Mac) so I am not surprised that it doesn’t behave consistently.

In <2020r1 it was possible to add items to the context menu of the HtmlViewer with the MBS plugin. It’s on my to-do list to pester Christian again next year to add the capability back.

1 Like

No LostFocus or GotFocus (yet when it has focus, Window.Focus.Name shows it as so…) etc etc.

We’ll add new events for WKWebViewControlMBS control:

willShowContextualMenu(menu as NSMenuMBS, NSEvent as NSEventMBS)
didCloseContextualMenu(menu as NSMenuMBS, NSEvent as NSEventMBS)

I may be able to add similar events for other controls if needed.