Skip to content
8 changes: 4 additions & 4 deletions java/src/main/java/com/genexus/webpanels/HttpContextWeb.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -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;
Expand Down