Browse Source

Make responsive work in Edge (#18620)

Change-Id: Id99a1da15293768e55733787e38f090f23c2991f
tags/7.6.0.alpha5
Artur Signell 8 years ago
parent
commit
93cb10eb97
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      client/src/com/vaadin/client/extensions/ResponsiveConnector.java

+ 3
- 3
client/src/com/vaadin/client/extensions/ResponsiveConnector.java View File

@@ -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++) {

Loading…
Cancel
Save