Reviewers: conroy,
Description:
Fixing WindowImplIE.getQueryString to look for the first occurence of a
? instead of the last. Similarly fixing WindowImplIE.getHash to look
for the first occurence of # instead of the last. This makes IE
consistent with the standards and other browsers.
Please review this at http://gwt-code-reviews.appspot.com/709801/show
Affected files:
M user/src/com/google/gwt/user/client/impl/WindowImplIE.java
Index: user/src/com/google/gwt/user/client/impl/WindowImplIE.java
===================================================================
--- user/src/com/google/gwt/user/client/impl/WindowImplIE.java (revision
8404)
+++ user/src/com/google/gwt/user/client/impl/WindowImplIE.java (working
copy)
@@ -59,7 +59,7 @@
@Override
public native String getHash() /*-{
var href = $wnd.location.href;
- var hashLoc = href.lastIndexOf("#");
+ var hashLoc = href.indexOf("#");
return (hashLoc > 0) ? href.substring(hashLoc) : "";
}-*/;
@@ -70,12 +70,12 @@
@Override
public native String getQueryString() /*-{
var href = $wnd.location.href;
- var hashLoc = href.lastIndexOf("#");
+ var hashLoc = href.indexOf("#");
if (hashLoc >= 0) {
// strip off any hash first
href = href.substring(0, hashLoc);
}
- var questionLoc = href.lastIndexOf("?");
+ var questionLoc = href.indexOf("?");
return (questionLoc > 0) ? href.substring(questionLoc) : "";
}-*/;
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors