On a webpage I have, I want the webpage itself to handle certain mouse down and mouse up events, but I also want the underlying control to handle the event. This works fine for certain controls, such as the button control or the text control. But for the listbox control and the segmentedbutton control, handling mouse events at the webpage level seems to prevent the control from working properly. The segmentedcontrol looks like it is getting the event, but the selected button doesn’t change. For the listbox, I can’t select any item in the list.
Is there a way to use a page level event handler for the mouse up and mouse down events, but still reliably have the underlying control handle the event as well?
What is wrong with using the controls events, in addition to the page ones ? If you want to handle them all in one place, just use a common method you call from each…
For KeyPressed, JavaScript Document.KeyDown will catch the event on all the page. But from what I see here, neither ListBox not segmented control seem to steal the page event.