summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorHenri Sara <henri.sara@gmail.com>2017-09-27 11:39:59 +0300
committerGitHub <noreply@github.com>2017-09-27 11:39:59 +0300
commit69776b1d08d40bcdd89b9cc5b050e8db793ec06b (patch)
treee114f5a9c7015ac80e8df78fbbd1704516712a49 /client
parent48e202a80653c2c8a9e31db11814d23b87d6ec19 (diff)
downloadvaadin-framework-69776b1d08d40bcdd89b9cc5b050e8db793ec06b.tar.gz
vaadin-framework-69776b1d08d40bcdd89b9cc5b050e8db793ec06b.zip
Fix GridLayout on IE and PhantomJS (#10087)
Additional fixes for #10077 for browsers that do not support document.fonts.ready by performing a delayed re-layout.
Diffstat (limited to 'client')
-rw-r--r--client/src/main/java/com/vaadin/client/ui/gridlayout/GridLayoutConnector.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/client/src/main/java/com/vaadin/client/ui/gridlayout/GridLayoutConnector.java b/client/src/main/java/com/vaadin/client/ui/gridlayout/GridLayoutConnector.java
index 6749d14b10..31d419b802 100644
--- a/client/src/main/java/com/vaadin/client/ui/gridlayout/GridLayoutConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/gridlayout/GridLayoutConnector.java
@@ -76,13 +76,18 @@ public class GridLayoutConnector extends AbstractComponentContainerConnector
private static native void registerFontLoadedCallback()
/*-{
try {
- if ($doc.fonts && $doc.fonts.status == 'loading') {
+ if (!$doc.fonts) {
+ // perform delayed forced refresh
+ setTimeout(function() {
+ $wnd.vaadin.forceLayout();
+ }, 300);
+ } else if ($doc.fonts.status == 'loading') {
$doc.fonts.ready.then(function () {
$wnd.vaadin.forceLayout();
});
}
} catch(err) {
- // fonts ready promise not supported by the browser
+ // just rely on the normal rendering being close to correct
}
}-*/;