Closed Bug 1651922 Opened 3 years ago Closed 3 years ago

Reader mode availability can be hit or miss due to paint event timing


(Toolkit :: Reader Mode, defect)

78 Branch





(Reporter: bugzilla.mozilla, Unassigned)




(5 files)

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

Steps to reproduce:

Visit page which had reader mode available before 78.0.2 upgrade.

Reader view button is for some pages, but not for as many as previously (66% fewer for me), eg. it works for

Actual results:

Eg. this page had reader icon visible near address bar before the upgrade, but it's not available after upgrade

Expected results:

First screenshot shows that page opened in previous version of firefox can access reader mode for the url, but reader mode is not available in second screenshot. I expect the reader button to be there.

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

What version were you using "before the upgrade"? I don't see a reader mode button on on e.g. Firefox 76, either.

You can check your upgrade version history using the preferences (search for "update", click "show update history").

Flags: needinfo?(bugzilla.mozilla)

What version were you using "before the upgrade"?


There isn't anything to show update history.

I don't see a reader mode button on on e.g. Firefox 76, either.

I was reading this article in reader mode while firefox was updating to 78.0.2, right after update finished firefox crashed and reader mode from this website disappeared completely.

Flags: needinfo?(bugzilla.mozilla)

So, I'm confused, because as I noted before, on the "bad management" article, I don't see an icon on older versions, either. The JIT article does show me a reader mode icon, even on current/newer Firefoxes. I'm not sure why it wouldn't for you...

We also haven't changed the reader mode algorithm code in Firefox for a few versions. There's a new layout / UI for it, but the underlying code is the same. The code got refactored in preparation for Fission, but in theory that shouldn't affect what's going on here. If it did, I'd expect the effects to be reproducible.

Do you see the same results for the 3 articles you mentioned on a clean profile / in Firefox's safe mode?

Flags: needinfo?(bugzilla.mozilla)

Also, do you use the builtin updater? Do you not get this button when searching the prefs?

I don't think update history is available on Linux

Flags: needinfo?(bugzilla.mozilla)

The reader mode is back on the jit article, but not the other two... I asked if they changed anything related to how articles are displayed.

Look at this, reader mode has nondeterministic behavior. I contacted iism and they albo couldn't start reader mode on their site. I opened a suggested link in a new windows (NOT private window) inspected source code, found article html tag, so it must work. In one windows reader mode is available, but not in the other. Both have the same html code around article code.

I tired that again and reader mode is gone

The HTML for doesn't actually contain the article. The article is fetched after the initial page loads using XHR, and this is why things don't work. If you can get it to work sometimes, it's because we wait for the webpage to paint, and if you're lucky the painting happens after the webpage has inserted the actual article content. None of this is new, however - the same race condition existed in Firefox 77 and earlier.

We're tracking coming up with a fix for this in bug 1636150, but it's non-trivial because we don't just want to listen for every change to every webpage all the time in order to re-check whether reader mode should be available - that'd be a significant battery and performance issue. So there's a balance, and I'm not sure where that should be struck (even if it's obvious that where it's being struck right now is also not right).

Closed: 3 years ago
Resolution: --- → DUPLICATE
See Also: → 1259027, 1636150
Summary: Reader mode no longer available on certain pages → Reader mode availability can be hit or miss due to paint event timing
See Also: 1636150

Thanks for explanation, it does make sense. It's a bit strange, as before 78.0.2 I'm sure reader mode was available 100% of the times on this domain.

You need to log in before you can comment on or make changes to this bug.