Closed Bug 2035512 Opened 5 months ago Closed 2 months ago

Inserting mouse cursor caret in address bar at specific location no longer works when clicking near top/bottom edges of box (insertable height does not match visual height)

Categories

(Firefox :: Address Bar, defect, P3)

Firefox 151
defect

Tracking

()

VERIFIED FIXED
155 Branch
Accessibility Severity s3
Tracking Status
firefox-esr115 --- unaffected
firefox-esr140 --- unaffected
firefox-esr153 --- wontfix
firefox150 --- unaffected
firefox151 --- wontfix
firefox152 --- wontfix
firefox153 --- wontfix
firefox154 --- verified
firefox155 --- verified

People

(Reporter: ke5trel, Assigned: daisuke)

References

(Regression)

Details

(4 keywords, Whiteboard: [sng])

Attachments

(3 files, 1 obsolete file)

STR:

  1. Start latest Nightly 152.0a1 on Ubuntu 26.04.
  2. Move the mouse cursor into the address bar above/below where there is text.
  3. When the cursor icon first changes to an "I" to indicate insertion, left-click and drag to make a selection.

Expected:
Caret inserted at mouse cursor position like before.

Actual:
Caret inserted at end of address when clicking on bottom edge or at beginning of address when clicking on top edge.

The deadzone around the edges of the address bar where caret insertion fails despite the icon showing "I" is 5px which is 36% of the clickable height. The user must be careful to click directly over text for caret insertion to work at the cursor location like before.

Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=02376ed8674012d2bd575682466cc9177039adb9&tochange=a77a08b9be8a059936afa68f259adb86823bb75f

Regressed by Bug 2031757.

:emilio, since you are the author of the regressor, bug 2031757, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Flags: needinfo?(emilio)

This is kind of expected because the editable element no longer covers the whole padding area...

Severity: -- → S3
Flags: needinfo?(emilio)
Priority: -- → P3

I guess a potential way of addressing this for the urlbar could be to bump up the line-height.

Hey Emilo! I'm the Engineering REO for Fx151.

Is this bug something that we can expect a patch/uplift for? Specifically, your comment regarding that this may expected behavior, I wasn't sure if this was more of a WONTFIX.

Thank you!

Flags: needinfo?(emilio)

Yeah I don't see how to easily fix it other than doing something like comment 3 (which works on the urlbar but not on the smartbar etc). This feels very low severity but lmk if you disagree.

Flags: needinfo?(emilio)

When I first encountered this, it wasn't clear why it was happening. Insertion failed randomly and it took me some time to figure out I wasn't clicking in the right spot. It is relatively easy to account for once you understand how it works but many people will have a similar confusing discovery process and some will never fully understand it. Users expect the border and cursor icon to define the interactive area but that is no longer the case.

The smaller and less forgiving interactive area also makes the address bar less accessible, requiring more precise cursor placement. The address bar is very prominent and should be as frictionless as possible.

Chrome has the expected behavior.

Accessibility Severity: --- → s3

This was partially fixed but has regressed again in latest Nightly. The cursor icon changed to a caret only in the insertable areas which avoided confusion but now it has gone back to the full height, including areas that are not insertable.

Partial fix window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=14b0bb51437f40a70414998f8bdc96c3ae09cf23&tochange=baacfcca6a956c09ebf7b735290133eed268df8c

Partially fixed by Bug 2039721.

Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=3f9d84a97b5989975cacbfd4ef1f7a6a4842fbaa&tochange=1f793ac428db458797324746e0964d708f9cb926

Regressed by Bug 2050821.

Component: Layout: Form Controls → Address Bar
Depends on: 2039721
Product: Core → Firefox
Regressed by: 2050821
Summary: Inserting mouse cursor caret in address bar at specific location no longer works when clicking near top/bottom edges of box → Inserting mouse cursor caret in address bar at specific location no longer works when clicking near top/bottom edges of box (insertable height does not match visual height)

let's investigate this as part of Nova follow-ons

Whiteboard: [sng]

I agree with comment 6 and think we should fix this for Nova.

Blocks: nova-urlbar-input
No longer blocks: nova-urlbar-follow-ups

(In reply to Drew Willcoxon :adw (Away July 17–July 24) from comment #9)

I agree with comment 6 and think we should fix this for Nova.

Or at least revert it back to before bug 2050821 regressed it again, but we need to be careful not to reintroduce the problem that bug 2050821 was addressing.

I tried a few things, and it seems that increasing line-height works well, as Emilio suggested. I will make the patch.

Assignee: nobody → daisuke
Status: NEW → ASSIGNED
Pushed by dakatsuka.birchill@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/0c8a121f4e29 https://hg.mozilla.org/integration/autoland/rev/b61d1b06ff39 Increase the urlbar input's line-height so the caret can be placed anywhere r=desktop-theme-reviewers,urlbar-reviewers,dao
Pushed by sstanca@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/54009ff250a4 https://hg.mozilla.org/integration/autoland/rev/a24092a99e09 Revert "Bug 2035512 - Increase the urlbar input's line-height so the caret can be placed anywhere r=desktop-theme-reviewers,urlbar-reviewers,dao" for causing wpt failures in anchor-scroll-position-try-016.html.

Reverted this because it was causing wpt failures in anchor-scroll-position-try-016.html.

  • Revert link
  • Push with failures
  • Failure Log
  • Failure line: TEST-UNEXPECTED-PASS | /css/css-anchor-position/anchor-scroll-position-try-016.html | Initially, anchored is at top left position - expected FAIL
Flags: needinfo?(daisuke)
Flags: needinfo?(daisuke)
Pushed by dakatsuka.birchill@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/9f4bdbdd64a5 https://hg.mozilla.org/integration/autoland/rev/2a566d62ef69 Increase the urlbar input's line-height so the caret can be placed anywhere r=desktop-theme-reviewers,urlbar-reviewers,dao
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 155 Branch
QA Whiteboard: [search][qa-triage-done-c155/b154][qa-ver-needed-c155/b154]

The patch landed in nightly and beta is affected, along with ESR.
:daisuke, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

Flags: needinfo?(daisuke)
Attachment #9622369 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined/Reason for urgency: User can't put the caret position correctly by clicking at the edge of the urlbar.
  • Code covered by automated testing?: no
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: no
  • Steps to reproduce for manual QE testing:
  • Risk associated with taking this patch: low
  • Explanation of risk level: The code changes only CSS line-height.
  • String changes made/needed?: None
  • Is Android affected?: unknown
Flags: needinfo?(daisuke)
Attachment #9622370 - Flags: approval-mozilla-esr153?

firefox-esr153 Uplift Approval Request

  • User impact if declined/Reason for urgency: User can't put the caret position correctly by clicking at the edge of the urlbar.
  • Code covered by automated testing?: no
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: no
  • Steps to reproduce for manual QE testing:
  • Risk associated with taking this patch: low
  • Explanation of risk level: The code changes only CSS line-height.
  • String changes made/needed?: None
  • Is Android affected?: unknown
Attachment #9622369 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: qe-verify+
Flags: in-testsuite-
Attachment #9622370 - Flags: approval-mozilla-esr153? → approval-mozilla-esr153+

:daisuke backed out of esr153 due to bc failures and wpt failures

Flags: needinfo?(daisuke)
Attachment #9622370 - Flags: approval-mozilla-esr153+ → approval-mozilla-esr153?
Flags: needinfo?(daisuke)
QA Whiteboard: [search][qa-triage-done-c155/b154][qa-ver-needed-c155/b154] → [search][qa-triage-done-c155/b154][qa-ver-needed-c155/b154][uplift]

We wanted to uplift this fix to the ESR, but it might make another regression, we decided to stop uplifting. Thanks!

Attachment #9622370 - Attachment is obsolete: true
Attachment #9622370 - Flags: approval-mozilla-esr153?

Reproducible on a 2026-04-28 Firefox Nightly build on Ubuntu 22.

Verified as fixed on Firefox Nightly 155.0a1 and Firefox 154.0b9 on Ubuntu 22, macOS 13, Windows 10.

Status: RESOLVED → VERIFIED
QA Whiteboard: [search][qa-triage-done-c155/b154][qa-ver-needed-c155/b154][uplift] → [search][qa-triage-done-c155/b154][qa-ver-done-c155/b154][uplift]
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: