Can't exit Reader Mode on local files after clearing history
Categories
(Toolkit :: Reader Mode, defect, P5)
Tracking
()
People
(Reporter: rajeev_v_pillai, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:105.0) Gecko/20100101 Firefox/105.0
Steps to reproduce:
- Open a local HTML file (running Firefox with
--private
) - Switch to Reader Mode.
- Settings > Privacy & Security > Clear Data & Clear History
- Try to exit Reader Mode.
Actual results:
Reader Mode not exited.
Expected results:
Browser should exit Reader Mode.
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Updated•1 year ago
|
Hello, thank you for the bug report!
Managed to reproduce this issue on:
- Firefox 114.0.2;
- Firefox 115.0;
- Nightly 116.0a1;
Tested and reproduced on:
- Windows 10;
- macOS 12;
- Ubuntu 22;
Setting as NEW so the developers can have a look.
Comment 3•1 year ago
|
||
The severity field is not set for this bug.
:dao, could you have a look please?
For more information, please visit BugBot documentation.
Updated•1 year ago
|
Comment 4•1 year ago
|
||
Loading a new page using the address bar still works, and clearing history as well as loading local files in reader mode are both niche usecases, so I can't see fixing this being high priority.
The fundamental reason here is that we end up here but don't have a history entry (because everything got cleared) and we end up in https://searchfox.org/mozilla-central/rev/ea550f0d1afaf7747ebd988325ea10cf4e3e4de4/toolkit/components/reader/ReaderMode.sys.mjs#89 which tries to use the content principal (which is the about:reader?url=... one) to load the original URL (which is file:...
) which then fails for security reasons.
A fix would probably involve extracting the original file URI and using that as the triggering principal here. We don't necessarily want to do that for other URI types because it would impact whether we e.g. send same-site cookies, which we probably don't want to mess with.
Description
•