Make IE11 work with Firefox history implementation
Change-Id: I2a3f52603bc4e374ddd960ce344ed1cd82fe56e3
diff --git a/user/src/com/google/gwt/user/client/impl/HistoryImplMozilla.java b/user/src/com/google/gwt/user/client/impl/HistoryImplMozilla.java
index 6d0da57..720356f 100644
--- a/user/src/com/google/gwt/user/client/impl/HistoryImplMozilla.java
+++ b/user/src/com/google/gwt/user/client/impl/HistoryImplMozilla.java
@@ -22,6 +22,11 @@
@Override
protected String decodeFragment(String encodedFragment) {
+ // IE11 chooses the firefox permutation
+ // make sure we use the code from HistoryImpl instead of relying on FF behaviour
+ if (isIE11()) {
+ return super.decodeFragment(encodedFragment);
+ }
// Mozilla browsers pre-decode the result of location.hash, so there's no
// need to decode it again (which would in fact be incorrect).
return encodedFragment;
@@ -50,4 +55,8 @@
$wnd.location.hash = this.@com.google.gwt.user.client.impl.HistoryImpl::encodeFragment(Ljava/lang/String;)(historyToken);
}
}-*/;
+
+ private native boolean isIE11() /*-{
+ return $wnd.navigator.userAgent.indexOf('Trident') != -1
+ }-*/;
}