private void onClick() {
        // Allow the click we're about to synthesize to pass through to the
        // superclass and containing elements. Element.dispatchEvent() is
        // synchronous, so we simply set and clear the flag within this method.
        allowClickPropagation = true;

        // Mouse coordinates are not always available (e.g., when the click is
        // caused by a keyboard event).
        final NativeEvent evt = Document.get().createClickEvent(
                1,
                0,
                0,
                0,
                0,
                false,
                false,
                false,
                false);
        getElement().dispatchEvent(evt);

        allowClickPropagation = false;
    }
Used to decide whether to allow clicks to propagate up to the superclass
or container elements.
stroom-core-client-widget/src/main/java/stroom/widget/button/client/BaseSvgButton.java