Closed Bug 1651922 Opened 4 years ago Closed 4 years ago

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

Categories

(Toolkit :: Reader Mode, defect)

78 Branch
defect

Tracking

()

RESOLVED DUPLICATE of bug 1636150

People

(Reporter: bugzilla.mozilla, Unassigned)

References

Details

Attachments

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

https://carolchen.me/blog/jits-intro/
https://iism.org/article/developers-can-t-fix-bad-management-57

Reader view button is for some pages, but not for as many as previously (66% fewer for me), eg. it works for https://www.technologyreview.com/2020/06/19/1004190/uk-covid-contact-tracing-app-fiasco/

Actual results:

Eg. https://carolchen.me/blog/jits-intro/ 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 https://iism.org/article/developers-can-t-fix-bad-management-57 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"?

78.0.1

There isn't anything to show update history.

I don't see a reader mode button on https://iism.org/article/developers-can-t-fix-bad-management-57 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 iism.org 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 https://iism.org/article/how-many-of-you-know-deep-down-that-the-team-is-working-on-something-that-no-customer-wants-54 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).

Status: UNCONFIRMED → RESOLVED
Closed: 4 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.

Attachment

General

Created:
Updated:
Size: