private boolean isCaptionEvent(final NativeEvent event) {
        // Lazy init content elements.
        if (dialogContent == null) {
            dialogContent = ElementUtil.findChild(content.getElement(), "dialog-content");
            dialogButtons = ElementUtil.findChild(content.getElement(), "dialog-buttons");
        }

        final EventTarget target = event.getEventTarget();
        if (Element.is(target)) {
            final Element element = Element.as(target);
            // Check the event targets the dialog.
            if (getElement().isOrHasChild(element)) {
                // If the target is dialog content then ensure the event does not target child elements.
                if (dialogContent != null && dialogContent.isOrHasChild(element)) {
                    return dialogContent.equals(element);
                }
                // If the target is dialog buttons then ensure the event does not target child elements.
                if (dialogButtons != null && dialogButtons.isOrHasChild(element)) {
                    return dialogButtons.equals(element);
                }
                return true;
            }
        }
        return false;
    }
Called on mouse up in the caption area, ends dragging by ending event
capture.

@param event the mouse up event that ended dragging
@see DOM#releaseCapture
@see #beginDragging
@see #endDragging
stroom-core-client-widget/src/main/java/stroom/widget/popup/client/view/ResizableDialog.java