Closed Bug 358074 Opened 18 years ago Closed 17 years ago

link in iframe on page with target as page loads new page scrolled to position of link

Categories

(Firefox :: General, defect)

2.0 Branch
x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: rwizard, Unassigned)

References

()

Details

(Whiteboard: CLOSEME 07/14)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0

html doc with iframe, doc given name in javascript, say 'x'

iframe contains links to several html pages, all links with target='x'

click on link in iframe loads selected html page (replacing current page containing iframe)

But the new page loads scrolled down to the position of the link on the page it links from.

So if link in original page iframe is 100px down from top, new page will load scrolled down 100px. Or 200px or whatever y position of link is on original page.

Hitting reload in Firefox will then reload to top of page.

It appears that Firefox sees the y pixel position of the link in the iframe as the top of the page - thus substituting y=0 with y=100 or whatever when the linked to page loads.



Reproducible: Always

Steps to Reproduce:
1.Three html docs: index.html with iframe that calls iframedoc.html and new.html
2.javascript in index.html header window.name = "x";
3.link in iframedoc.html: <a href="new.html" target="x">View New Page</a>
4.Open index.html, click on link in iframe
5.Pixel position of link on page in Firefox determines how new.html loads.
6.If link is 100 pixels down on index.html, then new.html will load scrolled down 100 pixels.

Actual Results:  
y pixel position of link uri in iframe on first page determines top y pixel position of page that replaces it.

Expected Results:  
New page should load with document top visible, top left x=0 y=0, not scrolled down by location in pixels from the top of the link on the previous page.

All previous versions of Firefox load pages properly.
Reporter, do you still see this problem with the latest Firefox 2? If not, can you please close this bug as WORKSFORME. Thanks!
Whiteboard: CLOSEME 07/14
Version: unspecified → 2.0 Branch
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.