Back button stops working after removing IFRAME with JavaScript

UNCONFIRMED
Unassigned

Status

()

--
minor
UNCONFIRMED
10 years ago
a year ago

People

(Reporter: rickbassham, Unassigned, NeedInfo)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

10 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3

If you add an iframe to the page, navigate to a different page in the iframe (to add another item in the history), then remove the iframe with javascript, the back button no longer works.

Reproducible: Always

Steps to Reproduce:
1. Add an iframe to a page with javascript.
2. Set the iframe's src attribute.
3. Navigate to another page inside the iframe.
4. Remove the iframe from the page with javascript.
5. Try to use the back button.
Actual Results:  
The page does not go to the previous page, no matter how many times you click the back button.

Expected Results:  
The page to go to the previous page.

A workaround for website creators is to leave the iframe on the page.  Multiple back button clicks are still required to get to the parent's previous page, but it works.
Component: History: Global → Document Navigation

Updated

a year ago
Flags: needinfo?(rickbassham)

Comment 1

a year ago
Hiya,

I am currently looking for bugs to fix as part of my Open Source Development module at Coventry University and I am interested in developing this bug.

Please could you assign this task to me and give me more information.

This is my first bug fix and any help would be appreciated.

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