Closed Bug 1812232 Opened 1 year ago Closed 1 year ago

Geolocation permission prompt looks broken when search term persistence is enabled

Categories

(Firefox :: Address Bar, defect, P1)

Firefox 111
x86_64
Linux
defect

Tracking

()

VERIFIED FIXED
111 Branch
Tracking Status
firefox111 --- verified
firefox112 --- verified

People

(Reporter: gregp, Assigned: jteow)

References

(Blocks 3 open bugs)

Details

Attachments

(2 files)

Attached image geolocation_prompt.png

Steps to reproduce:

  1. Open Firefox Nightly
  2. Navigate to about:config
  3. Set browser.urlbar.showSearchTerms.featureGate to true
  4. Set browser.urlbar.showSearchTerms.enabled to true
  5. Enter a search term in the address bar
  6. Press enter
  7. Wait for Google to request access to your location (It's not clear to me how they decide to do this, it seems like a 50/50 chance each time).
  8. Alternatively, open developer tools
  9. Go to 'Console'
  10. Paste document.documentElement.addEventListener("click", () => navigator.geolocation.getCurrentPosition(() => {}));
  11. Press enter
  12. Click anywhere on the page content

Expected results:
Geolocation permission prompt is anchored to the permission request button (like a normal webpage) or suppressed.

Actual results:
Geolocation prompt looks like its awkwardly anchored to the magnifying glass.

Thanks for pointing this out.

We might want to add some logic to revert back to the URL if we detect the Geolocation prompt has been triggered.

Severity: -- → S4
Priority: -- → P3
Assignee: nobody → jteow
Attachment #9316241 - Attachment description: WIP: - Bug 1812232 - Revert urlbar while Geolocation prompt is shown - r?adw → Bug 1812232 - Revert urlbar while Geolocation prompt is shown - r?adw
Status: NEW → ASSIGNED
Severity: S4 → S2
Priority: P3 → P1

Escalating priority since this can cause major issue with other popups.

See Also: → 1815769
Attachment #9316241 - Attachment description: Bug 1812232 - Revert urlbar while Geolocation prompt is shown - r?adw → Bug 1812232 - Revert urlbar if a PopupNotification is about to be shown while search terms persist - r?adw
See Also: → 1815710
Pushed by jteow@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8f6889529519
Revert urlbar if a PopupNotification is about to be shown while search terms persist - r=adw,Gijs

You should consider adding telemetry for how often the SERP actually triggers this scenario. The utility of this feature may be greatly reduced if Google is constantly requesting geolocation access.

Very true, thanks for the feedback (and reminder) Gregory, we're scheduling that as a follow-up to prioritize a fix that was affecting a similar use-case.

Blocks: 1815971
Blocks: 1815973
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch

Reproduced on a 2023-01-24 Nightly build on macOS 12.
Verified as fixed on Nightly 112.0a1(build ID: 20230214093302) on macOS 12, Ubuntu 22, Windows 10.

Status: RESOLVED → VERIFIED
Flags: qe-verify+

Reproduced on a 2023-01-24 Nightly build on macOS 12.
Verified as fixed on Firefox 111.0b3(build ID: 20230219190218) on macOS 12, Ubuntu 22, Windows 10.

Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: