The default place manager ends up creating two history events when the browser
url is updated externally (e.g. via a bookmark). The doRevealPlace called by
onValueChange should not update the browser url since it is being notifier of a
change that just happened.
The symptom is that the browser 'back' button cannot navigate back beyond the
first page load. Looking at the browser history (e.g. in chrome by holding
down the back button) shows two entries with the same value. Manually going
back 2 entries has the desired effect.
Below is a patch that addresses the issue:
--- src/main/java/com/gwtplatform/mvp/client/proxy/PlaceManagerImpl.java
+++ src/main/java/com/gwtplatform/mvp/client/proxy/PlaceManagerImpl.java.new
@@ -264,7 +264,7 @@
revealDefaultPlace();
} else {
placeHierarchy = tokenFormatter.toPlaceRequestHierarchy(historyToken);
- doRevealPlace(getCurrentPlaceRequest(), true);
+ doRevealPlace(getCurrentPlaceRequest(), false);
}
} catch (TokenFormatException e) {
unlock();
Original issue reported on code.google.com by snstan...@gmail.com on 24 Feb 2012 at 4:10
Original issue reported on code.google.com by
snstan...@gmail.com
on 24 Feb 2012 at 4:10