Closed Bug 1289815 Opened 9 years ago Closed 8 years ago

When using History API in JavaScript and try to hit history.back() in an iframe, the parent page is navigated to previous page in history instead of iframe page

Categories

(Core :: DOM: Core & HTML, defect)

47 Branch
All
macOS
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: sandeep.bonala, Unassigned, NeedInfo)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36 Steps to reproduce: When using Histroy API in JavaScript and try to call history.back() in an iframe's javascript, the parent page is navigated to previous page in history instead of iframe page Actual results: When using Histroy API in JavaScript and try to call history.back() in an iframe's javascript, the parent page is navigated to previous page in history instead of iframe page Expected results: The page in iframe should be navigated
I have an iframe in a webpage, and I am using history API and trying to hit history.back() in iframe window, but the parent windows page is redirected. OS: Mac 10.11.4 Firefox: 47.0.1 FYI: Working with previous versions of Firefox.
Severity: normal → critical
OS: Unspecified → Mac OS X
Priority: -- → P1
Hardware: Unspecified → All
Severity: critical → normal
Component: Untriaged → DOM
Priority: P1 → --
Product: Firefox → Core
Summary: When using Histroy API in JavaScript and try to hit history.back() in an iframe, the parent page is navigated to previous page in history instead of iframe page → When using History API in JavaScript and try to hit history.back() in an iframe, the parent page is navigated to previous page in history instead of iframe page
.history is a global API, not per iframe or anything. So using history.back() in any browser may load previous page in the top level browsing context or in other iframes. But you say your page worked before FF47. Could you please upload a _minimal_ testscase, thanks.
Flags: needinfo?(sandeep.bonala)
Do you perhaps have some Google ads in your page. There was a recently a bug in Google ads scripts that they ended up affecting to session history.
(In reply to Olli Pettay [:smaug] from comment #2) > .history is a global API, not per iframe or anything. So using > history.back() in any browser may load previous page in the top level > browsing context or in other iframes. > > But you say your page worked before FF47. > Could you please upload a _minimal_ testcase, thanks. I see the history object is global. But yes, it used to work in previous versions of FF (<47)
(In reply to Olli Pettay [:smaug] from comment #3) > Do you perhaps have some Google ads in your page. There was a recently a bug > in Google ads scripts that they ended up affecting to session history. No I don't have any Google ad on my page
But any chance for a minimal testcase or link to the page showing the issue?
Close this as INCOMPLETE, as without more information from the reporter, it's hard to move this issue forward. Dear Reporter, feel free to reopen it and offer more information. Thanks.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → INCOMPLETE
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.