Skip to content

Commit 354ae99

Browse files
Edge UserAgent support for BrowserId and BrowserVersion functions (#590)
* GXOfiice setDate applies default format (m/d/yy h:mm) only when the cell does not have a Date format defined issue:95850 * Gxoffice autofit now checks all rows to get the total columns being used to set the width. issue:95577 * Unit test for GXoffice for testing Autofit and Formats of cells with Date values issue 95850 95577 * issue72284 change the order user-agent is read because user-agent end in edge browsers includes chrome version * change to recognize edg/edge/edgA/edgios as ID of edge browser in user agent depending on the enviroment where edge is run
1 parent 7b275c1 commit 354ae99

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

java/src/main/java/com/genexus/webpanels/HttpContextWeb.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public class HttpContextWeb extends HttpContext {
7171

7272
private static final Pattern MULTIMEDIA_GXI_GRID_PATTERN = Pattern.compile("(\\w+)(_\\d{4})$");
7373

74-
private static final Pattern EDGE_BROWSER_VERSION_REGEX = Pattern.compile(" Edge\\/([0-9]+)\\.",
74+
private static final Pattern EDGE_BROWSER_VERSION_REGEX = Pattern.compile(" Edg[\\w]{0,3}\\/([0-9]+)\\.",
7575
Pattern.CASE_INSENSITIVE);
7676
private static final String GXEVENT_PARM = "gxevent";
7777

@@ -661,12 +661,12 @@ public int getBrowserType() {
661661
String userAgent = request.getHeader("USER-AGENT");
662662

663663
if (userAgent != null) {
664-
if (userAgent.toUpperCase().indexOf("CHROME") != -1) {
664+
if ((userAgent.indexOf("Edg") ) != -1) {
665+
return BROWSER_EDGE;
666+
} else if (userAgent.toUpperCase().indexOf("CHROME") != -1) {
665667
return BROWSER_CHROME;
666668
} else if (userAgent.toUpperCase().indexOf("FIREFOX") != -1) {
667669
return BROWSER_FIREFOX;
668-
} else if ((userAgent.indexOf("Edge")) != -1) {
669-
return BROWSER_EDGE;
670670
} else if ((userAgent.indexOf("MSIE")) != -1) {
671671
if ((userAgent.indexOf("Windows CE")) != -1)
672672
return BROWSER_POCKET_IE;

0 commit comments

Comments
 (0)