I figured it out. On the chance it may be useful to some, here's what was happening.
Because my app is a "web app" and wants to behave mostly like a normal app and not like a typical web page, I use a JQuery mousedown handler to prevent arbitrary drag selection on the page. I do want *certain* areas of the page to be selectable, but for instance I don't want my row of toolbar icons to be selectable, and in general I don't want the various widgets making up my page to be selectable.
So, in this mousedown handler I was checking if the mouse was over various selectable areas on the page, and if so I returned true, else I returned false, the latter having the effect of swallowing the mouse event and thus disabling selection except where allowed.
The surprise was that Chrome/Chromium/CEF treats this a bit differently than Firefox. In Firefox, if the mousedown handler returns false, it will still process mouse events on the browser scroll bars correctly. In Chrome/Chromium/CEF that false eats the event even for the scroll bars.
The solution is to check if the mousedown is on one of the window scroll bars, and return true in that case. I wasn't able to find a way to check for the scroll bars directly, but I found that when the scroll bars are shown the area they cover is considered to be "outside" the window content, at least in Chrome/Chromium/CEF.
Adding the if below "process scroll bars normally" fixed things.
- Code: Select all
function HandleJQueryMouseDown( e )
{
// not shown: checks for various selectable mouse down areas, which return true
// process scroll bars normally
if ( e.pageX > ( $( window ).scrollLeft() + $( window ).width() ) ||
e.pageY > ( $( window ).scrollTop() + $( window ).height() ) )
{
return true;
}
// the following false prevents arbitrary selection on the page
return false;
}