Thanks for looking into this,
The problem you describe below is part of the bug. The real bug is that
once you get into a state where __gwt_historyToken is '' (ie: no hash or
hash fails to decode), you can't get to the reload() method because the
if statement always treats the history token as false and short-circuits.
The result of this is that when a new token is entered manually, the
token is picked up, but the reload block in urlChecker:
if ($wnd.__gwt_historyToken && (token != $wnd.__gwt_historyToken)) {
$wnd.location.reload();
}
evaluates to:
if ('' && (token != '')) {
$wnd.location.reload();
}
where the '' evalates to boolean false and the block is skipped.
I think that this code would fix the problem:
if ($wnd.__gwt_historyToken !== undefined && (token !=
$wnd.__gwt_historyToken)) {
$wnd.location.reload();
}
Thanks!
Matt.
Joel Webber wrote:
> Matthew,
>
> It looks like your point about fallthrough on the first clause in that
> expression is correct. However, the reason this abomination is there
> in the first place is that manually entering URLs (where only the
> fragment changes) causes IE to get into a nasty state where it 'gets
> crashy' for wont of a better term. The only solution I was able to
> find was to forcibly reload the app.
>
> The point of the first clause was to make sure that __gwt_historyToken
> was even defined in the first place (though looking at it now, I
> realize that it's not quite correct). It will currently fail to
> reload() when the user manually enters an empty history token that is
> different from the current state. This needs to be fixed.
>
> Does that clear things up a bit, and am I missing anything?
>
> Thanks,
> joel.
>
> On 1/1/08, *Matthew Mastracci* <mmas...@gmail.com
if ($wnd.__gwt_historyToken && (token != $wnd.__gwt_historyToken)) {
$wnd.location.reload();