When showing a DialogWindow with WebBrowserComponent as its content, the web browser is unclickable.
I’m using setContentNotOwned() and runModalLoop().
I can see the web page and its content, and the mouse icon even changes when hovering on links, but I can’t click on anything.
static bool isEventBlockedByModalComps (MSG& m)
{
if (Component::getNumCurrentlyModalComponents() == 0
|| GetWindowLong (m.hwnd, GWLP_USERDATA) == improbableWindowNumber)
return false;
switch (m.message)
{
case WM_MOUSEMOVE:
case WM_NCMOUSEMOVE:
case 0x020A: /* WM_MOUSEWHEEL */
case 0x020E: /* WM_MOUSEHWHEEL */
case WM_KEYUP:
case WM_SYSKEYUP:
case WM_CHAR:
case WM_APPCOMMAND:
case WM_LBUTTONUP:
case WM_MBUTTONUP:
case WM_RBUTTONUP:
case WM_MOUSEACTIVATE:
case WM_NCMOUSEHOVER:
case WM_MOUSEHOVER:
return isHWNDBlockedByModalComponents (m.hwnd);
case WM_NCLBUTTONDOWN:
case WM_NCLBUTTONDBLCLK:
case WM_NCRBUTTONDOWN:
case WM_NCRBUTTONDBLCLK:
case WM_NCMBUTTONDOWN:
case WM_NCMBUTTONDBLCLK:
case WM_LBUTTONDOWN:
case WM_LBUTTONDBLCLK:
case WM_MBUTTONDOWN:
case WM_MBUTTONDBLCLK:
case WM_RBUTTONDOWN:
case WM_RBUTTONDBLCLK:
case WM_KEYDOWN:
case WM_SYSKEYDOWN:
if (isHWNDBlockedByModalComponents (m.hwnd))
{
Component* const modal = Component::getCurrentlyModalComponent (0);
if (modal != nullptr)
modal->inputAttemptWhenModal();
return true;
}
break;
default:
break;
}
return false;
Now It receives mouse clicks and key presses as long as I don’t touch the scrollbars,
once I try to scroll it behaves again like before, until I presses something not Jucey.
Hmm, no idea about that then! You might want to just not make the window modal… If IE is going to behave strangely in a modal situation, it’d be hard to chase around trying to keep it happy.