Ascrod / readerview

Implementation of Firefox Reader View as an add-on for the Pale Moon web browser.
9 stars 3 forks source link

Anchors not handled correctly #27

Closed Ascrod closed 6 years ago

Ascrod commented 6 years ago

This is really two separate bugs, but they might be related so I'm reporting them together.

Steps to reproduce: 1) Click an anchor link on the page, then enter Reader View. RV begins at the top of the page, not at the selected anchor. 2) While in Reader View, click an anchor link on the page. RV exits when the anchor is navigated to.

Example page for reference: https://docs.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-language-quick-reference

Ascrod commented 6 years ago

Confirming that this is indeed two separate issues. The first issue is caused by not handling an existing anchor in the URL correctly when entering Reader View. This has already been fixed in my local tree.

The second issue is due to the nature of using about:reader explicitly in the URL. This can be handled a few ways. A method in an old version of AboutReader.jsm replaces all same-page links on an about:reader page with about:reader links. Another option is to intercept and redirect any same-page links clicked on an about:reader page.

Ascrod commented 6 years ago

Should be resolved with 3dcc80aa10db2510041f7d6d5e01f9bcfc27661d and 684cc23aa0ca9ce26da6f9e41ad271a9b9b4da32.