aboutsummaryrefslogtreecommitdiffstats
path: root/shared
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-10-10 15:10:07 +0300
committerLeif Åstrand <leif@vaadin.com>2012-10-10 15:10:07 +0300
commit235c4cb98a16d2f60aeb8c49cd0c25b81371dd22 (patch)
treeb57fb3da9c8d8192c0711d297e351f1b355aad66 /shared
parent60342e38e0fae5af57a1500ef1517f035af0be30 (diff)
downloadvaadin-framework-235c4cb98a16d2f60aeb8c49cd0c25b81371dd22.tar.gz
vaadin-framework-235c4cb98a16d2f60aeb8c49cd0c25b81371dd22.zip
Parse Trident versions to support IE in compatibility mode (#9887)
Change-Id: If4c12ed2ec4fca63bb68259f44904e014782792b
Diffstat (limited to 'shared')
-rw-r--r--shared/src/com/vaadin/shared/VBrowserDetails.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/shared/src/com/vaadin/shared/VBrowserDetails.java b/shared/src/com/vaadin/shared/VBrowserDetails.java
index 2143e884c0..46d29ac75c 100644
--- a/shared/src/com/vaadin/shared/VBrowserDetails.java
+++ b/shared/src/com/vaadin/shared/VBrowserDetails.java
@@ -95,6 +95,14 @@ public class VBrowserDetails implements Serializable {
.substring(userAgent.indexOf("webkit/") + 7);
tmp = tmp.replaceFirst("([0-9]+)[^0-9].+", "$1");
browserEngineVersion = Float.parseFloat(tmp);
+ } else if (isIE) {
+ int tridentPos = userAgent.indexOf("trident/");
+ if (tridentPos >= 0) {
+ String tmp = userAgent.substring(tridentPos
+ + "Trident/".length());
+ tmp = tmp.replaceFirst("([0-9]+\\.[0-9]+).*", "$1");
+ browserEngineVersion = Float.parseFloat(tmp);
+ }
}
} catch (Exception e) {
// Browser engine version parsing failed
@@ -456,7 +464,9 @@ public class VBrowserDetails implements Serializable {
* supported or might work
*/
public boolean isTooOldToFunctionProperly() {
- if (isIE() && getBrowserMajorVersion() < 8) {
+ // Check Trident version to detect compatibility mode
+ if (isIE() && getBrowserMajorVersion() < 8
+ && getBrowserEngineVersion() < 4) {
return true;
}
// Webkit 533 in Safari 4.1+, Android 2.2+, iOS 4+