Opened 12 years ago

Closed 6 years ago

#2973 closed defect (fixed)

Dojo's back button with bookmarking only saves the last page when another site is visited

Reported by: guest Owned by: Ben Lowery
Priority: high Milestone: 2.0
Component: Core Version: 0.4.2
Keywords: back button, bookmark, needsreview Cc:
Blocked By: Blocking:

Description (last modified by ben hockey)

Problem using the dojo's back button (the one with bookmarking http://archive.dojotoolkit.org/nightly/ajax/tests/undo/test_browser_book...):

If this is the browsing history: XHR 1 XHR 2 XHR 3 XHR 4 Another website is visited like google.com and the back button is clicked, it loads the previous application state correctly -- the XHR 4 shows. But when you click the back button again, nothing will happen -- it should suppose to display XHR 3, then when clicking again the back button XHR 2 will be displayed, then XHR 1.

Change History (10)

comment:1 Changed 12 years ago by James Burke

Milestone: 0.9
Resolution: wontfix
Status: newclosed

Unfortunately, this is not supported. When you leave the page that has dojo.undo.browser on it, the history stack that is stored in JavaScript? is destroyed. When you come back from the other page, the JavaScript?-based history history stack is reinitialized since the page is reloaded.

If you have ideas on how to support this, please feel free to add to the bug, but it seems like a use case that cannot be supported.

comment:2 Changed 12 years ago by guest

The dhtml history may bring light to this in the future: http://codinginparadise.org/projects/dhtml_history/testDhtmlHistory.html

It saves the stack after leaving the application and going back.

comment:3 Changed 12 years ago by James Burke

Component: GeneralCore
Priority: highnormal
Resolution: wontfix
Status: closedreopened

Using a form to save the state as dhtml history does is not quite compatible with the Dojo implementation. The Dojo implementation allows any Java object to be saved in the history stack, which means functions could be on the object (and actually need to be on the object to accept the back button action.

However, maybe the code could be reworked to only allow storage of json objects and the application registers global back/forward calls. In that case, it might work. I'll reopen the ticket and set it for 0.9. Not sure it will get in for 0.9, but at least keep it on the radar a little more.

comment:4 Changed 12 years ago by James Burke

small correction I meant JavaScript? not Java in my last comment.

comment:5 Changed 12 years ago by Adam Peller

Owner: changed from anonymous to Ben Lowery
Status: reopenednew

comment:6 Changed 12 years ago by bill

Milestone: 0.91.1

comment:7 Changed 11 years ago by Ben Lowery

That kind of change would be a big break in the API. Unsure we want to support it right now...

comment:8 Changed 11 years ago by Adam Peller

Milestone: 1.12.0

comment:9 Changed 7 years ago by ben hockey

Description: modified (diff)
Keywords: needsreview added

comment:10 Changed 6 years ago by dylan

Resolution: fixed
Status: newclosed

dojo.undo isn't a thing in modern dojo, dojo.back is deprecated, and between dojo/hash and dojo/router we think this is covered, so closing as wontfix.

Note: See TracTickets for help on using tickets.