-
Notifications
You must be signed in to change notification settings - Fork 436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[main branch] Cache is incorrect when navigating using promoted frames #643
Comments
cc @seanpdoyle in case you have any idea why this changed after #431 |
@manuelpuyol thank you for opening this. Does this test re-create your test case? test("test promoted frame navigations are cached", async ({ page }) => {
await page.goto("/src/tests/fixtures/tabs.html")
await await page.click("#tab-2")
await nextEventNamed(page, "turbo:frame-render")
assert.equal(await page.textContent("#tab-content"), "Two")
await page.click("#tab-3")
await nextEventNamed(page, "turbo:frame-render")
assert.equal(await page.textContent("#tab-content"), "Three")
await page.goBack()
await nextBeat()
assert.equal(await page.textContent("#tab-content"), "Two")
await page.goBack()
await nextBeat()
assert.equal(await page.textContent("#tab-content"), "One")
}) |
yes! |
seanpdoyle
added a commit
to seanpdoyle/turbo
that referenced
this issue
Jul 20, 2022
Closes hotwired#643 First, rename the `FrameRendererDelegate.frameExtracted` callback method to `willRenderFrame`, then pass along both the _current_ frame and the _new_ frame as arguments. Next, in the `FrameController.willRenderFrame` callback, assign the `previousFrameElement` property (used elsewhere in the `visitCachedSnapshot` callback) to contain the contents of the _current_ frame, instead of the _new_ frame.
I've opened #644 to try and resolve this. |
dhh
pushed a commit
that referenced
this issue
Jul 28, 2022
Closes #643 First, rename the `FrameRendererDelegate.frameExtracted` callback method to `willRenderFrame`, then pass along both the _current_ frame and the _new_ frame as arguments. Next, in the `FrameController.willRenderFrame` callback, assign the `previousFrameElement` property (used elsewhere in the `visitCachedSnapshot` callback) to contain the contents of the _current_ frame, instead of the _new_ frame.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks like this was introduced by #431
Testing in 1811189 (last PR merged before 431):
Screen.Recording.2022-07-20.at.3.53.15.PM.mov
Testing in 837e977:
Screen.Recording.2022-07-20.at.3.56.43.PM.mov
The text was updated successfully, but these errors were encountered: