Closed Bug 1536620 Opened 6 years ago Closed 6 years ago

ctrl + 0 does not return zoom to default size

Categories

(Toolkit :: Reader Mode, defect, P3)

defect

Tracking

()

VERIFIED FIXED
mozilla69
Tracking Status
firefox-esr60 --- unaffected
firefox66 --- unaffected
firefox67 --- unaffected
firefox68 --- unaffected
firefox69 --- fixed

People

(Reporter: asa, Assigned: fpberkay, Mentored)

References

Details

Attachments

(1 file)

When using the hamburger menu page zoom controls or ctrl++ and ctrl+-, Ctrl + 0 does not return to the default zoom in reader mode.

Tested on 2019-03-19 nightly build on windows on x86.

(In reply to Asa Dotzler [:asa] from comment #1)

Gijs said: we should have also updated the 'reset' code: https://searchfox.org/mozilla-central/rev/358f816f63da072145c593e9e2ac36b7250ecd25/browser/base/content/browser-fullZoom.js#315

Berkay Barlas, would you be able to work on this as well?

Mentor: gijskruitbosch+bugs
Flags: needinfo?(fpberkay)

(In reply to :Gijs (he/him) from comment #2)

Berkay Barlas, would you be able to work on this as well?

I started working on this Gijs.

Creating a constant default font_size and creating a function that sets font_size to that default value inside AboutReader.jsm then sending message from browser-fullZoom would be a solution but I think we should reset "reader.font_size" preference to default value.

However, when I try Services.prefs.clearUserPref("reader.font_size"), I get (NS_ERROR_NOT_AVAILABLE) error.

Flags: needinfo?(fpberkay)

(In reply to Berkay Barlas from comment #3)

(In reply to :Gijs (he/him) from comment #2)

Berkay Barlas, would you be able to work on this as well?

I started working on this Gijs.

Great, thank you!

Creating a constant default font_size and creating a function that sets font_size to that default value inside AboutReader.jsm then sending message from browser-fullZoom would be a solution but I think we should reset "reader.font_size" preference to default value.

However, when I try Services.prefs.clearUserPref("reader.font_size"), I get (NS_ERROR_NOT_AVAILABLE) error.

We can't set preferences directly in the content process. You should be able to call AsyncPrefs.reset("reader.font_size") in the content process (ie from AboutReader.jsm) though (it'll forward the message to the parent and returns a promise that resolves when the preference has been updated). Does that help?

Assignee: nobody → fpberkay
Status: NEW → ASSIGNED
Flags: needinfo?(fpberkay)

(In reply to :Gijs (he/him) from comment #4)

We can't set preferences directly in the content process. You should be able to call AsyncPrefs.reset("reader.font_size") in the content process (ie from AboutReader.jsm) though (it'll forward the message to the parent and returns a promise that resolves when the preference has been updated). Does that help?

Yes, that helped a lot :) . Should we reset zoom preferences of normal mode too when default zoom button clicked in reader mode or just font size preference of reader mode ?

Flags: needinfo?(fpberkay)

(In reply to Berkay Barlas from comment #6)

(In reply to :Gijs (he/him) from comment #4)

We can't set preferences directly in the content process. You should be able to call AsyncPrefs.reset("reader.font_size") in the content process (ie from AboutReader.jsm) though (it'll forward the message to the parent and returns a promise that resolves when the preference has been updated). Does that help?

Yes, that helped a lot :) . Should we reset zoom preferences of normal mode too when default zoom button clicked in reader mode or just font size preference of reader mode ?

I think just the font size pref is fine. :-)

Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68

This was backed out of release and esr version 68 (together with bug 1135593) in bug 1557256. The changes remain in 69 (soon on beta).

Target Milestone: mozilla68 → mozilla69

I have reproduced this bug with Nightly 68.0a1 (2019-03-19) on Windows 7, 64 Bit. The fix of the bug is verified with latest Beta 69.0b9!

Build ID 20190730004747
User Agent Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0

Status: RESOLVED → VERIFIED
QA Whiteboard: [good first verify] → [good first verify] [bugday-20190807]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: