diff --git a/core/modules/macros/navigator.js b/core/modules/macros/navigator.js index 57d617495..b48a9a1f2 100644 --- a/core/modules/macros/navigator.js +++ b/core/modules/macros/navigator.js @@ -97,9 +97,13 @@ exports.eventMap["tw-navigate"] = function(event) { if(this.hasParameter("set")) { this.wiki.setTextReference(this.params.set,event.navigateTo); } - // Add the tiddler to the top of the history stack + // Add a new record to the top of the history stack this.getHistory(); - this.history.stack.push({title: event.navigateTo}); + this.history.stack.push({ + title: event.navigateTo, + fromTitle: event.navigateFromTitle, + fromPosition: event.navigateFrom.getNodeBounds() + }); this.saveHistory(); event.stopPropagation(); return false; diff --git a/core/modules/macros/story/story.js b/core/modules/macros/story/story.js index cd9cc9d10..f89f7ddaa 100644 --- a/core/modules/macros/story/story.js +++ b/core/modules/macros/story/story.js @@ -291,14 +291,14 @@ exports.processHistoryChange = function() { for(t=this.prevHistory.stack.length-1; t>=topCommon; t--) { index = this.findStoryElementByTitle(0,this.prevHistory.stack[t].title); if(index !== undefined && this.storyview.navigateBack) { - this.storyview.navigateBack(this.storyNode.children[index]); + this.storyview.navigateBack(this.storyNode.children[index],this.history.stack[t]); } } // And now we navigate forwards through the new history to get to the latest tiddler for(t=topCommon; t