mashlib
mashlib copied to clipboard
Back button doesnt work when going from normal page to databrowser
Tested on
Version 64.0.3282.167 (Official Build) Built on Ubuntu , running on Ubuntu 16.04 (64-bit)
To reproduce
Go to : https://drive.verborgh.org/public/yo/ Paste into browser : https://drive.verborgh.org/public/yo/data/yo.ttl
Expected behaviour
Browser should return back to https://drive.verborgh.org/public/yo/
Actual behaviour
Browser stays on : https://drive.verborgh.org/public/yo/data/yo.ttl
Diagnosis
Related code :
window.onpopstate = function(event) {
window.document.outline.GotoSubject($rdf.sym(window.document.location.href), true, undefined, true, undefined)
}
Currently the assumption is that a previous page would also be called from the databrowser. It would be better if the onpopstate handler was more aware of the type of page that called it.
True. Maybe the databrowser leaves a trace property in the event, like paneName . If n pane name, allow the normal browser to reload the page.