zs1
zs1

Reputation: 749

Can GWT explicitly detect browser back/forward buttons (not just infer from history)

Suppose a GWT app goes to #a then #b then #a then the user presses back and I detect #b in the history.

Now I get a history event "#a". Is there any way to tell if the user pressed forward or back?

I might care because the page for #a might be a form and I might remember in memory that the second #a has some unsaved data type in the form while the first #a has not!

Thoughts?

Upvotes: 0

Views: 550

Answers (1)

Thomas Broyer
Thomas Broyer

Reputation: 64541

No, that's technically not possible.

(you could use the HTML5 History API –pushState and onpopstate– but GWT has no built-in support)

Upvotes: 1

Related Questions