Closed Bug 1885741 Opened 1 year ago Closed 1 year ago

clicking on anchor with empty fragment href inside an svg gives warning: Empty string passed to getElementById()

Categories

(Core :: SVG, defect)

Firefox 123
Desktop
Windows 11
defect

Tracking

()

RESOLVED FIXED
126 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox124 --- wontfix
firefox125 --- fixed
firefox126 --- fixed

People

(Reporter: eyalgruss, Assigned: longsonr)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

I have on <object> loading an external <svg> which contains <a> elements with href="#".
i want the empty fragment to allow tabstops. the anchor has a role as a button.
in firefox devtools i get "Empty string passed to getElementById()" when clicking the links, and the source of the error is the svg file.
i do not get this error on chromium. See here: https://oulipoh.com/resen/seasons

Assignee: nobody → longsonr
Status: NEW → ASSIGNED
Pushed by longsonr@gmail.com: https://hg.mozilla.org/integration/autoland/rev/0f0797227aaa Check string isn't empty before passing to getElementById r=emilio
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 126 Branch
Keywords: regression
Regressed by: 1867225

Comment on attachment 9391627 [details]
Bug 1885741 - Check string isn't empty before passing to getElementById r=emilio

Beta/Release Uplift Approval Request

  • User impact if declined: SVG use and animation elements with href="#" will result in console warnings. Pretty cosmetic but a prerequisite to fixing bug 1883804, and that bug I would like to get in beta if I manage to fix it.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce: See comment 0 in the bug but its just a console warning, not a functional problem.

Note: The non-empty string case has plenty of automated tests.

  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Simple code change that avoids calling getElementById with an empty string, the code continues to call getElementById in all other circumstances.
  • String changes made/needed: none
  • Is Android affected?: Yes
Attachment #9391627 - Flags: approval-mozilla-beta?

Set release status flags based on info from the regressing bug 1867225

Comment on attachment 9391627 [details]
Bug 1885741 - Check string isn't empty before passing to getElementById r=emilio

Approved for 125.0b2.

Attachment #9391627 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: