Closed Bug 212695 Opened 22 years ago Closed 22 years ago

Scrolling to named anchors in XHTML files from chrome doesn't work

Categories

(Core :: XML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jblanco, Assigned: hjtoi-bugzilla)

Details

Attachments

(1 file)

Clicking on a link in an xhtml page that's suppose to take you to a named anchor on a different page will bring up that new page, which has the anchor; but will not scroll to the location referenced. The page is just loaded. I see this using xhtml files from chrome. This problem was fixed in nsHTMLContentSink.cpp in 2001, but never got fixed in nsXMLContentSink.cpp. I'm attaching a patch that uses that same fix.
Attached patch patch with fixSplinter Review
Attachment #127761 - Flags: superreview?(bzbarsky)
Attachment #127761 - Flags: review?(bugmail)
Comment on attachment 127761 [details] [diff] [review] patch with fix Ugh. The problem is that things that don't support nsIURL do NOT support the concept of anchors, really... So this is all a pretty gross hack; probably to get wyciwyg: to work or something like that. :( We really need a better way to handle anchor references. sr=me on making this be just like the html sink, though.
Attachment #127761 - Flags: superreview?(bzbarsky) → superreview+
Comment on attachment 127761 [details] [diff] [review] patch with fix please move the "If the document we are loading..." comment to after the new code since it doesn't really apply to what you're doing (nor did it before)
Attachment #127761 - Flags: review?(bugmail) → review+
Fix checked in to trunk. I want this on the branch, but I'm just not sure...
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: