Skip to content
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

[fix] loading after completed lazy loading and restored visit #1227

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yasu551
Copy link

@yasu551 yasu551 commented Mar 19, 2024

Description

There is a problem with loading after lazy loading is completed and then visit restored. The frames that have completed lazy loading do not execute their loading processes. This problem occurs during visit restoration because the status information indicating that lazy loading has already been completed is not being fully restored. To reproduce this successfully, we need to set #hasBeenLoaded to true when connecting to the frame.

// src/core/frames/frame_controller.js

connect() {
  if (!this.#connected) {
    this.#connected = true
    if (this.loadingStyle == FrameLoadingStyle.lazy) {
      if (this.complete) {
        this.#hasBeenLoaded = true
      } else {
        this.appearanceObserver.start()
      }

Before this PR

before

After this PR

after

Relations

Closes #886

@yasu551
Copy link
Author

yasu551 commented Apr 2, 2024

@seanpdoyle could you review this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Frames with loading lazy not working when src changes after restoration visit
1 participant