From 583750936967e2eb2b35d48a8ea2519f351db1de Mon Sep 17 00:00:00 2001 From: Alexey Fansky Date: Thu, 9 Apr 2015 11:09:15 -0700 Subject: Adding a temporary style to VNotification on Chrome >=41 (#17252) Change-Id: I41c05e8f8487d351035804e0681947956d861479 --- client/src/com/vaadin/client/ui/VNotification.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'client/src') diff --git a/client/src/com/vaadin/client/ui/VNotification.java b/client/src/com/vaadin/client/ui/VNotification.java index d7639b0022..eee0f459a6 100644 --- a/client/src/com/vaadin/client/ui/VNotification.java +++ b/client/src/com/vaadin/client/ui/VNotification.java @@ -257,12 +257,19 @@ public class VNotification extends VOverlay { /** * Android 4 fails to render notifications correctly without a little * nudge (#8551) + * Chrome 41 now requires this too (#17252) */ - if (BrowserInfo.get().isAndroid()) { + if (BrowserInfo.get().isAndroid() + || isChrome41OrHigher()) { WidgetUtil.setStyleTemporarily(getElement(), "display", "none"); } } + private boolean isChrome41OrHigher() { + return BrowserInfo.get().isChrome() + && BrowserInfo.get().getBrowserMajorVersion() >= 41; + } + protected void hideAfterDelay() { if (delay == null) { delay = new Timer() { -- cgit v1.2.3