In message <20531f51e58eeb700e801d854d82d...@amlegion.org>, "Lester L. Martin II" writes: >On 2018-07-04 10:03, John P. Rouillard wrote: >> There is something odd happening with the history buffer. Start at: >> >> https://code.amlegion.org/hljs_line_numbers/ >> >> click on "Single line selection". You end up at: >> >> >> https://code.amlegion.org/hljs_line_numbers/artifact?udc=1&ln=on&name=b5869c31fbae9ca0#L2 >> >> bur rather than 2 items in the history, there are 4 items in my >> history: >> >> 4 >> https://code.amlegion.org/hljs_line_numbers/artifact?udc=1&ln=on&name=b5869c31fbae9ca0#L2 >> >> 3 >> https://code.amlegion.org/hljs_line_numbers/artifact?udc=1&ln=on&name=b5869c31fbae9ca0# >> >> 2 >> https://code.amlegion.org/hljs_line_numbers/artifact?udc=1&ln=on&name=b5869c31fbae9ca0#L2 >> >> 1 https://code.amlegion.org/hljs_line_numbers/doc/trunk/README.md >> >> I have to hit the back button 3 times to move back to the original >> page. >> It looks like URL's 2 and 4 are the same. >> >> Any idea what's happening here? >> >> Have a great day. > >Hey Mr. Rouillard, > >I bet I know what that is. The code uses window.location.hash to >establish where the URIs will link to by doing something that is >partially destructive. Something like: > >var uri = window.location; >var old_hash = window.location.hash; >window.location.hash = ""; >uri = window.location.href; >window.location.hash = old_hash; > >So now I need to figure out how to reset history to where it should >be after those operations. I'm welcome to ideas (that I'll review >later on and push up a fix to the repo and then pull into the >static files for my repos so that it can be tested.)
Maybe: https://stackoverflow.com/questions/8969878/in-javascript-how-do-i-clear-the-back-history-1 which offers: window.location.replace("path/to/target/page"); as way to fix? Have a great day. -- -- rouilj John Rouillard =========================================================================== My employers don't acknowledge my existence much less my opinions. _______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users