diff --git a/java/src/main/java/com/genexus/webpanels/HttpContextWeb.java b/java/src/main/java/com/genexus/webpanels/HttpContextWeb.java index 0c0aaf342..a22dc8076 100644 --- a/java/src/main/java/com/genexus/webpanels/HttpContextWeb.java +++ b/java/src/main/java/com/genexus/webpanels/HttpContextWeb.java @@ -71,7 +71,7 @@ public class HttpContextWeb extends HttpContext { private static final Pattern MULTIMEDIA_GXI_GRID_PATTERN = Pattern.compile("(\\w+)(_\\d{4})$"); - private static final Pattern EDGE_BROWSER_VERSION_REGEX = Pattern.compile(" Edge\\/([0-9]+)\\.", + private static final Pattern EDGE_BROWSER_VERSION_REGEX = Pattern.compile(" Edg[\\w]{0,3}\\/([0-9]+)\\.", Pattern.CASE_INSENSITIVE); private static final String GXEVENT_PARM = "gxevent"; @@ -661,12 +661,12 @@ public int getBrowserType() { String userAgent = request.getHeader("USER-AGENT"); if (userAgent != null) { - if (userAgent.toUpperCase().indexOf("CHROME") != -1) { + if ((userAgent.indexOf("Edg") ) != -1) { + return BROWSER_EDGE; + } else if (userAgent.toUpperCase().indexOf("CHROME") != -1) { return BROWSER_CHROME; } else if (userAgent.toUpperCase().indexOf("FIREFOX") != -1) { return BROWSER_FIREFOX; - } else if ((userAgent.indexOf("Edge")) != -1) { - return BROWSER_EDGE; } else if ((userAgent.indexOf("MSIE")) != -1) { if ((userAgent.indexOf("Windows CE")) != -1) return BROWSER_POCKET_IE;