Open Bug 1925820 Opened 1 year ago Updated 1 year ago

XML documents rendered with a linked XSLT stylesheet do not navigate to anchor in URL as is done in Chrome and Safari

Categories

(Core :: DOM: Navigation, defect)

defect

Tracking

()

Tracking Status
firefox133 --- affected

People

(Reporter: me, Unassigned)

References

()

Details

Consider a well-formed XML document containing a link to an XSLT transform which renders the document as HTML in the browser.

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="/format.xsl" type="text/xsl"?>
...

The XML and XSLT documents are served from the same https domain.

The transformed document contains internal anchors:

<a id="foo" href="...">...</a>

If the user enters or navigates to the XML document's url, including the anchor <a href="https://example.com/document.xml#foo">...</a>, the rendered document in the browser is not navigated to, but remains at the top of the page.

In Chrome and Mobile Safari (presumably Safari but need to test) the XML document is rendered and the anchor is navigated to.

My assumption is that Firefox, upon rendering XML with a linked XSLT stylesheet, does not check the URL after the transform and rendering the HTML in the browser. While in other browsers that check is performed.

Component: Address Bar → DOM: Navigation
Product: Firefox → Core

Works for me in 131.0.3 (64-bit). I click the link from https://emmas.site/blog/2024/10/19/a-firefox-xml-bug and I am scrolled to the: 2024-10-02 » 🐈‍⬛ heading.

(In reply to Daniel from comment #1)

Works for me in 131.0.3 (64-bit). I click the link from https://emmas.site/blog/2024/10/19/a-firefox-xml-bug and I am scrolled to the: 2024-10-02 » 🐈‍⬛ heading.

Hi Daniel, the example URL, https://dr-mae-space-cat.nekoweb.org/feed.xml#1, has a workaround in JavaScript applied.

I've posted a version without the workaround at https://dr-mae-space-cat.nekoweb.org/bugzilla.xml#1 and updated this bug.

Please confirm that the bug appears on this example when you get this.

Thank you.

Flags: needinfo?(firefox)

I can confirm that the second URL does not scroll to the anchor.

Flags: needinfo?(firefox)

Could be a dup of bug 809461, but it lost the testcase. So, I'm not sure whether it's exactly same issue. Alice-san, do you remember the detail?

Flags: needinfo?(alice0775)
See Also: → 809461

(In reply to Masayuki Nakano [:masayuki] (he/him)(JST, +0900) from comment #4)

Could be a dup of bug 809461, but it lost the testcase. So, I'm not sure whether it's exactly same issue. Alice-san, do you remember the detail?

Sorry, I don't remember at all.

Flags: needinfo?(alice0775)

No problem. I think it should be closed instead.

You need to log in before you can comment on or make changes to this bug.