Reset address bar scroll position on blur to show LTR origins
Categories
(Firefox :: Address Bar, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr68 | --- | unaffected |
firefox72 | --- | unaffected |
firefox73 | --- | verified |
firefox74 | --- | verified |
People
(Reporter: itiel_yn8, Assigned: mak)
References
(Regressed 1 open bug, Regression)
Details
(Keywords: parity-chrome, parity-edge, regression)
Attachments
(1 file)
47 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
|
Details | Review |
STR:
- Overflow the urlbar with a long url, hit enter
- Click the urlbar, hit End
- Unfocus the urlbar
AR:
URL is scrolled to the end, and the domain part is hidden
ER:
URL gets scrolled back to the origin, and the domain part is displayed.
Regressed by bug 1593964, mozregression claims part 3 is the exact regressor.
Comment 1•6 years ago
|
||
Can you reproduce with the megabar disabled?
(In reply to Dão Gottwald [::dao] from comment #1)
Can you reproduce with the megabar disabled?
By toggling browser.urlbar.update1
to false and restarting? Yes.
Comment 3•6 years ago
|
||
(In reply to Itiel from comment #0)
Regressed by bug 1593964, mozregression claims part 3 is the exact regressor.
Marco, can you take a look?
Updated•6 years ago
|
Comment 4•6 years ago
|
||
Sorry, missed that comment 2 suggests this reproduces with megabar disabled too.
Assignee | ||
Comment 5•6 years ago
|
||
I'll have a look, but I can't reproduce atm, unless AR and ER are inverted or I missed something.
Is this with an RTL build, with an RTL domain?
(In reply to Marco Bonardo [:mak] from comment #5)
unless AR and ER are inverted or I missed something.
Ah yes, that was the case. Fixed now.
Is this with an RTL build, with an RTL domain?
Doesn't matter if the domain is RTL.
IIRC this is an issue regardless of RTL/LTR directionality.
Assignee | ||
Comment 7•6 years ago
|
||
I'm still investigating reasons, but I must specify that it was not part 3 regressing this, it was part 1... That makes sense, I moved some selection code there, the reasons that code was added were not related, but it looks like it ended up supporting this case. I'll revise those changes and find a better call point for them.
Assignee | ||
Comment 8•6 years ago
|
||
Ok, I didn't technically regress this, what happened is that Bug 1571018 inadvertenly made us set the selection to zero on blur, with the scope of clearing an existing selection, not certainly to ensure the origin stays visible. That ended up "fixing" this bug. When I moved that code to a better position for its scope, in bug 1593964, I removed the accidental fix for this bug.
I went back to a version in May 2019 and even then we didn't use to move the selection.
I don't know what's the expected behavior here, we surely care that the origin is visible at least once, and that already happens on load.
I suspect we didn't change the selection on blur to avoid too much visual jumping, though while this was in the tree nobody really complained so... I guess we could fix it properly.
Comment 9•6 years ago
|
||
I think the current behavior makes sense for people who might want to edit, blur, and then continue to edit for whatever reason. There doesn't seem to be a strong case for resetting the scroll position on blur so I think we could just wontfix this.
Comment 10•6 years ago
|
||
(In reply to Dão Gottwald [::dao] from comment #9)
I think the current behavior makes sense for people who might want to edit, blur, and then continue to edit for whatever reason. There doesn't seem to be a strong case for resetting the scroll position on blur so I think we could just wontfix this.
Bug 1593964 comment 9 claims there's a security issue but I'm not sure I'd frame it that way.
Assignee | ||
Comment 11•6 years ago
•
|
||
(In reply to Dão Gottwald [::dao] from comment #9)
I think the current behavior makes sense for people who might want to edit, blur, and then continue to edit for whatever reason. There doesn't seem to be a strong case for resetting the scroll position on blur so I think we could just wontfix this.
Both sides have their pro and cons. I thought about the "continue editing" case, but if you use the keyboard shortcut we select the whole url (resetting the selection) and if you click on the urlbar, we either select all (still losing your position) or put the cursor where you click. The latter case happens only on Linux (provided we're not going to clickSelectsAll there, as discussed many times) or profiles with disabled clickSelectsAll, plus this would only affect cases where you are editing a long url at the end. So it's an edge case.
Moreover, for urls with RTL domains the formatter already ensures that the domain stays visible, so fixing this would make the behavior more coherent.
Considered that this new behavior has been in the product for months without negative feedback, it slightly improves security by keeping the origin visible, and it's coherent with RTL domains mode, I think we should fix this. There seems to be a little bit more benefits than downsides.
Assignee | ||
Comment 12•6 years ago
|
||
I also checked what other browsers do, both Edge and Chrome seem to act like it's requested here (reset scroll position on blur).
Assignee | ||
Comment 13•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Updated•6 years ago
|
Comment 14•6 years ago
|
||
Comment 15•6 years ago
|
||
bugherder |
Comment 16•6 years ago
|
||
Thanks for verifying this, Itiel. Mak, please nominate this for Beta approval when you get a chance.
Assignee | ||
Comment 17•6 years ago
|
||
Comment on attachment 9121293 [details]
Bug 1605889 - Ensure LTR origins stay visible on urlbar blur. r=dao
Beta/Release Uplift Approval Request
- User impact if declined: On blur we don't reset the urlbar input field scroll position to keep the origin in sight.
This patch reverts that behavior (reset scroll position) that we already had "by accident" in previous version, and that is on parity with other browsers - Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: comment 0 has steps
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): it's mirroring what we already do for RTL domains, single line code change with test.
- String changes made/needed:
Assignee | ||
Updated•6 years ago
|
Comment 18•6 years ago
|
||
Comment on attachment 9121293 [details]
Bug 1605889 - Ensure LTR origins stay visible on urlbar blur. r=dao
Fixes an accidental change in behavior with the location bar and provides more consistent behavior with other browsers. Approved for 73.0b8.
Comment 19•6 years ago
|
||
bugherder uplift |
Updated•6 years ago
|
Comment 20•6 years ago
|
||
Steps to reproduce are vague. I have noticed the difference between the affected and fixed builds and I have used these steps:
- Open the browser and load this test page:
'http://chart.apis.google.com/chart?chs=500x500&chma=0,0,100,100&cht=p&chco=FF0000%2CFFFF00%7CFF8000%2C00FF00%7C00FF00%2C0000FF&chd=t%3A122%2C42%2C17%2C10%2C8%2C7%2C7%2C7%2C7%2C6%2C6%2C6%2C6%2C5%2C5&chl=122%7C42%7C17%7C10%7C8%7C7%7C7%7C7%7C7%7C6%7C6%7C6%7C6%7C5%7C5&chdl=android%7Cjava%7Cstack-trace%7Cbroadcastreceiver%7Candroid-ndk%7Cuser-agent%7Candroid-webview%7Cwebview%7Cbackground%7Cmultithreading%7Candroid-source%7Csms%7Cadb%7Csollections%7Cactivity|Chart' - Click the link in the address bar to select it whole.
- Tap the right arrow key from the keyboard to go to the end of the link.
- Deselect the link/address bar by chicking anywhere else on the content area of the page.
Affected: The link will remain displayed alligned to the right.
Fixed: The link will reset to the normal left allignment.
With these steps I have verified this fix in Nightly v74.0a1 from 2020-01-20 and Beta v73.0b8 on Windows 10 and Mac OS 10.14.
Please confirm that these steps are valid to verify the fix!
Assignee | ||
Comment 21•6 years ago
|
||
Yep, looks good to me. Thank you.
Updated•5 years ago
|
Description
•