Example usage for com.vaadin.client WidgetUtil runWebkitOverflowAutoFix

List of usage examples for com.vaadin.client WidgetUtil runWebkitOverflowAutoFix

Introduction

In this page you can find the example usage for com.vaadin.client WidgetUtil runWebkitOverflowAutoFix.

Prototype

public static void runWebkitOverflowAutoFix(final Element elem) 

Source Link

Document

Run workaround for webkits overflow auto issue.

Usage

From source file:com.haulmont.cuba.web.toolkit.ui.client.jqueryfileupload.CubaFileUploadProgressWindow.java

License:Apache License

@Override
public void setVisible(boolean visible) {
    /*/*from w ww.  j a  v a  2 s .c o m*/
     * Visibility with VWindow works differently than with other Paintables
     * in Vaadin. Invisible VWindows are not attached to DOM at all. Flag is
     * used to avoid visibility call from
     * ApplicationConnection.updateComponent();
     */
    if (!visibilityChangesDisabled) {
        super.setVisible(visible);
    }

    if (visible && BrowserInfo.get().requiresPositionAbsoluteOverflowAutoFix()) {

        /*
         * Shake up the DOM a bit to make the window shed unnecessary
         * scrollbars and resize correctly afterwards. The version fixing
         * ticket #11994 which was changing the size to 110% was replaced
         * with this due to ticket #12943
         */
        WidgetUtil.runWebkitOverflowAutoFix(contents.getFirstChildElement());
    }
}