From 4494ae037bffa50dc6225595d5d236dfc0f948fc Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Tue, 1 Sep 2015 20:49:30 +0300 Subject: [PATCH] Make responsive work in Edge (#18620) Change-Id: Idb53cf6e8089154ec50979f3cd63faeaac419972 --- .../com/vaadin/client/extensions/ResponsiveConnector.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/com/vaadin/client/extensions/ResponsiveConnector.java b/client/src/com/vaadin/client/extensions/ResponsiveConnector.java index 621c69788c..ae330be8f4 100644 --- a/client/src/com/vaadin/client/extensions/ResponsiveConnector.java +++ b/client/src/com/vaadin/client/extensions/ResponsiveConnector.java @@ -205,7 +205,7 @@ public class ResponsiveConnector extends AbstractExtensionConnector implements // Get all the rulesets from the stylesheet var theRules = new Array(); - var IE = @com.vaadin.client.BrowserInfo::get()().@com.vaadin.client.BrowserInfo::isIE()(); + var IEOrEdge = @com.vaadin.client.BrowserInfo::get()().@com.vaadin.client.BrowserInfo::isIE()() || @com.vaadin.client.BrowserInfo::get()().@com.vaadin.client.BrowserInfo::isEdge()(); var IE8 = @com.vaadin.client.BrowserInfo::get()().@com.vaadin.client.BrowserInfo::isIE8()(); try { @@ -263,8 +263,8 @@ public class ResponsiveConnector extends AbstractExtensionConnector implements // Array of all of the separate selectors in this ruleset var haystack = rule.selectorText.split(","); - // IE parses CSS like .class[attr="val"] into [attr="val"].class so we need to check for both - var selectorRegEx = IE ? /\[.*\]([\.|#]\S+)/ : /([\.|#]\S+?)\[.*\]/; + // IE/Edge parses CSS like .class[attr="val"] into [attr="val"].class so we need to check for both + var selectorRegEx = IEOrEdge ? /\[.*\]([\.|#]\S+)/ : /([\.|#]\S+?)\[.*\]/; // Loop all the selectors in this ruleset for(var k = 0, len2 = haystack.length; k < len2; k++) { -- 2.39.5