Revision: 8406
Author: jlaba...@google.com
Date: Thu Jul 22 12:01:10 2010
Log: 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.

Review at http://gwt-code-reviews.appspot.com/709801

Review by: con...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=8406

Modified:
 /trunk/user/src/com/google/gwt/user/client/impl/WindowImplIE.java

=======================================
--- /trunk/user/src/com/google/gwt/user/client/impl/WindowImplIE.java Fri Oct 16 14:48:33 2009 +++ /trunk/user/src/com/google/gwt/user/client/impl/WindowImplIE.java Thu Jul 22 12:01:10 2010
@@ -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

Reply via email to