@Override
    public void onBrowserEvent(final Event event) {
        // If we're not yet dragging, only trigger mouse events if the event
        // occurs in the caption wrapper.
        switch (event.getTypeInt()) {
            case Event.ONMOUSEDOWN:
            case Event.ONMOUSEUP:
            case Event.ONMOUSEMOVE:
            case Event.ONMOUSEOVER:
            case Event.ONMOUSEOUT:
                if (!dragging && !isCaptionEvent(event)) {
                    return;
                }
                break;
            default:
                // Don't care about all mouse events
        }

        super.onBrowserEvent(event);
    }
This is overridden as we don't want popups to hide without the presenter
to get a chance to do something about it. When hide occurs the presenter
will be notified via the event and will then choose whether or not to
force the popup to hide.
stroom-core-client-widget/src/main/java/stroom/widget/popup/client/view/Dialog.java