Closed Bug 1645607 Opened 8 months ago Closed 8 months ago

Toggling reader mode on and off whilst viewing a plain text file changes the font to proportional


(Toolkit :: Reader Mode, defect, P3)

77 Branch



Tracking Status
firefox-esr68 --- wontfix
firefox-esr78 --- wontfix
firefox77 --- wontfix
firefox78 --- wontfix
firefox79 --- verified


(Reporter: me, Assigned: Gijs)




(Keywords: regression)


(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0

Steps to reproduce:

Start Firefox 77 in safe mode.
Navigate to a plaintext file (reader mode button does not appear for local files — only remote ones). For instance, view a text file on GitHub in raw mode.
Click reader mode in the address bar and wait for it to load.
Exit reader mode.
Click reader mode again.

Actual results:

The file is rendered in monospace when I first navigate to it.
The file is rendered in the reader view's selected font when I enable it.
The file is rendered in proportional (default font) when I disable reader mode — regardless of reader view's font. (In my case, it is rendered in serif, as my default font is serif; whereas my reader mode is in sans serif.)
Attempting to enable reader mode again results in a "Failed to load article from page" error.
Navigating back to the file (which is still in a proportional font) and attempting to enable reader mode again yields the same result.
The file returns to monospace and the reader mode is functional again upon refreshing the page.

Expected results:

The file should remain monospace outside reader mode.
The reader view should be able to be enabled when it was disabled once.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Reader Mode
Product: Firefox → Toolkit

You can work around by hitting "reload".

Ever confirmed: true
Regressed by: 1154295

The issue in this bug was caused by reader mode replacing the 'pre' tag
that we use to wrap plaintext documents with a series of paragraphs.
This change affected the original document. Instead, we can put the
paragraphs in a clone of the original document, which is fine for
reader mode and avoids altering the original.

Assignee: nobody → gijskruitbosch+bugs
Severity: -- → S3
Priority: -- → P3
Pushed by
avoid changing plain text documents when entering reader mode, r=jaws
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla79
Flags: qe-verify+

Confirmed issue on 78.0.1(20200630195452) - macOS 10.15.5 with this example.
Fix verified on 79.0b4 with macOS 10.15.5, Windows 10, Ubuntu 18.

Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.