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.)

Thanks for letting me know this, I'm by far not great at JS and
am subject to making a myriad of mistakes by not looking for things
that would be as non-obvious as this due to the side effect being
far elsewhere than related easily to the operations of the code
at hand.

--
Lester L. Martin II
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to