The Reader Mode controls sidebar is affected by page zoom actions
Categories
(Toolkit :: Reader Mode, defect, P3)
Tracking
()
People
(Reporter: avaida, Assigned: fpberkay, Mentored)
References
Details
(Whiteboard: [about-reader-ui])
Attachments
(2 files, 2 obsolete files)
Reproducible on: Nightly 38.0a1 (2015-02-22) Affected platforms: Windows 7 (x64), Windows 8.1 (x86), Ubuntu 14.04 (x64), Mac OS X 10.9.5 Steps to reproduce: 1. Launch Firefox with a clean profile. 2. Enable Reader Mode from about:config by setting 'reader.parse-on-load.enabled' to true. Restart the browser. 3. Open an article from the web - (e.g.) http://www.bbc.com/news/world-australia-31579804 4. Enter Reader Mode by clicking the associated button from the Location Bar. 5. Zoom in or out from the page and check the sidebar. Expected result: The Reader Mode UI is not affected by zoom in/zoom out actions. Actual result: Both the sidebar and any opened panels such as the page styling panel are affected by zoom actions.
Updated•9 years ago
|
Comment 1•9 years ago
|
||
On Windows at least, using the panel controls to zoom does not change impact panel, but using "normal" zoom features (eg, hamburger menu, ctrl-+ etc) does.
Comment 2•9 years ago
|
||
Yeah, this bug is about the normal browser page-zoom controls, not the ones that reader view itself exposes. I'm not sure there's a non-gross way to fix this. AFAIK, we don't have any way for a page to suppress the browser's zooming. Same bug exists for pdf.js... If you load a PDF and zoom the page with the hamburger menu controls, its controls change size too. It does seem to grab Control/Command +/-/0, so using the keyboard shortcuts will result in PDF.js zooming just the PDF, and the actual page-zoom level is unchanged. Maybe grabbing the keyboard shortcuts would be a "good enough" fix for this bug.
Comment 4•9 years ago
|
||
Mistakenly filed against Firefox 38 and should be instead 38 Branch. Sorry for the spam. dkl
Updated•8 years ago
|
Updated•8 years ago
|
Comment 5•5 years ago
|
||
(In reply to Justin Dolske [:Dolske] from comment #2)
Same bug exists for pdf.js... If you load a PDF and zoom the page with the
hamburger menu controls, its controls change size too. It does seem to grab
Control/Command +/-/0, so using the keyboard shortcuts will result in PDF.js
zooming just the PDF, and the actual page-zoom level is unchanged.Maybe grabbing the keyboard shortcuts would be a "good enough" fix for this
bug.
This should be mentorable. The zoom code lives in the parent process in the browser, and the browser knows whether we're in reader mode, and could just not do what it does by default, instead sending a message to the content browser to increase text size. Probably somewhere here:
where we could send a message to reader mode like we do here: https://searchfox.org/mozilla-central/rev/92d11a33250a8e368c8ca3e962e15ca67117f765/browser/base/content/browser.js#5420 .
Reader mode would have to listen for that message, increment/decrement the font size (and maybe the text width?), and we'd need to come up with some feedback in the reader mode sidebar that indicates something changed.
Assignee | ||
Comment 6•5 years ago
|
||
I would be really happy to try solve this issue under your mentorship Gijs.
Comment 7•5 years ago
|
||
(In reply to Berkay Barlas from comment #6)
I would be really happy to try solve this issue under your mentorship Gijs.
Sure. Let me know if you have more questions after comment #5 ?
Assignee | ||
Comment 8•5 years ago
|
||
(In reply to :Gijs (he/him) from comment #7)
Sure. Let me know if you have more questions after comment #5 ?
I added sendAsyncMessage that sends Reader:ZoomIn and Reader:ZoomOut to Reader in https://searchfox.org/mozilla-central/rev/92d11a33250a8e368c8ca3e962e15ca67117f765/browser/base/content/browser-fullZoom.js#269-287
Also reader mode listens that message and changes font size accordingly, however, I couldn't find a method in tabbrowser.js
that returns whether it is in reader or not.
I found a method isAboutReader() in AboutReaderChild.js,but, I'm not sure how to use it.
Comment 9•5 years ago
|
||
(In reply to Berkay Barlas from comment #8)
(In reply to :Gijs (he/him) from comment #7)
Sure. Let me know if you have more questions after comment #5 ?
I added sendAsyncMessage that sends Reader:ZoomIn and Reader:ZoomOut to Reader in https://searchfox.org/mozilla-central/rev/92d11a33250a8e368c8ca3e962e15ca67117f765/browser/base/content/browser-fullZoom.js#269-287
Also reader mode listens that message and changes font size accordingly, however, I couldn't find a method in tabbrowser.js
that returns whether it is in reader or not.I found a method isAboutReader() in AboutReaderChild.js,but, I'm not sure how to use it.
You can use the same check as here:
Assignee | ||
Comment 10•5 years ago
|
||
Assignee | ||
Comment 11•5 years ago
|
||
Thank you for you suggestion Gijs.
I created a revision and here is a gif that shows current behavior.
ReaderSideBar
I was going to ask some questions but seems like you already answered them :D.
I have one more question, as in the gif, clicking zoomIn/zoomOut button doesn't increments/decrements the percentage in Reader Mode currently. Should it also update the zoom percentage?
Comment 12•5 years ago
|
||
(In reply to Berkay Barlas from comment #11)
Thank you for you suggestion Gijs.
I created a revision and here is a gif that shows current behavior.
ReaderSideBarI was going to ask some questions but seems like you already answered them :D.
I have one more question, as in the gif, clicking zoomIn/zoomOut button doesn't increments/decrements the percentage in Reader Mode currently. Should it also update the zoom percentage?
I think it would be very tricky, so I wouldn't worry about the zoom percentage here.
Assignee | ||
Comment 13•5 years ago
|
||
Depends on D23147
Assignee | ||
Comment 14•5 years ago
|
||
Depends on D23340
Assignee | ||
Comment 15•5 years ago
|
||
Gijs I'm updating the revision with
hg commit -m "message"
moz-phab submit
``
Is it the right way to do it?
Comment 16•5 years ago
|
||
(In reply to Berkay Barlas from comment #15)
Gijs I'm updating the revision with
hg commit -m "message" moz-phab submit `` Is it the right way to do it?
Please use hg histedit
to merge the different commits (roll the "fixup" commits into the top commit). When updating the commits after that, use hg amend
or hg commit --amend
to update the existing commit.
Assignee | ||
Comment 17•5 years ago
|
||
Okay, thank you Gijs. I updated it.
By the way I changed the name of buttonControls in UpdateFontSizeButton to UpdateFontSizeButtonControls because I need it bind to 'this' in order to use in changeFontSize method.
Comment 18•5 years ago
|
||
Can you close the other 2 revisions you created? (There's a dropdown above the comment box at the bottom that has a "Close revision" option)
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 19•5 years ago
|
||
(In reply to :Gijs (he/him) from comment #18)
Can you close the other 2 revisions you created? (There's a dropdown above the comment box at the bottom that has a "Close revision" option)
Okay, I abandoned two other revisions.
Updated•5 years ago
|
Comment 20•5 years ago
|
||
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/3ea90cc2e917 Make The Reader Mode controls sidebar not affected by page zoom actions r=Gijs
Comment 21•5 years ago
|
||
bugherder |
Comment 22•5 years ago
|
||
Reproduced the issue on affected Beta 67 and Release 66.
Verified - Fixed on latest Nightly 68.0a1 (2019-03-20) (64-bit).
Comment 23•5 years ago
|
||
Clearing 'affected' flags for older versions as this is effectively a feature implementation that we won't be uplifting.
Comment 24•5 years ago
|
||
This was backed out of release and esr version 68 in bug 1557256. The changes remain in 69 (soon on beta).
Description
•