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

[bug] Issue deleting and duplicating frames #932

Open
Kitenite opened this issue Dec 26, 2024 · 0 comments
Open

[bug] Issue deleting and duplicating frames #932

Kitenite opened this issue Dec 26, 2024 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@Kitenite
Copy link
Contributor

Describe the bug

I first noticed that if we had 3 or more frames and I tried to delete the second one, the third one would just take second ones place and it's dimensions and everything

I managed to fix that by settings the dimensions, and webview src again whenever the settings to a frame component change using an effect

But something I couldn't fix was the issue with the webview. When we delete the second frame, second frame's webview becomes the webview for the third frame which gets shifted. So the problem with that is, you can't select the frame anymore because the webview id and frame id don't match, which I managed to fix by changing the webview id to the new frame id. But the main problem is the webview navigation history.

Let's say in my third frame's webview, I navigated to some other page and navigated back, then the webview can still goForward. But when I delete the second frame and second frame's webview becomes the third frame's webview, the navigation history is gone and I can't go forward anymore. I tried fixing it by fetching the third frame's webview and setting it to webviewRef.current, it did solve this issue, but it again doesn't let me select or interact with that webview for some reason.

This is a big message and might not be very clear from my end. So I'll just tell you how to reproduce it.

Step 1: Open a new project, and run it

Step 2: Duplicate the main frame, and then duplicate the duplicated frame

Step 3: Set all three frames to different sizes and devices, let's say, iPhone, iPad and MacBook

Step 4: In the third frame, navigate to some other link by changing the url bar or any other way, and navigate back using the back button

Step 5: Delete the second frame, you'll notice that second frame's dimensions will get applied to the third frame (not if you are in my webview implementation branch, I fixed the dimension issue in that)
Contd.

Step 6: You'll notice that for the third frame which became the second after deleting the second one, there won't be a go forward button anymore because it is using the webview from the deleted frame and it's navigation history.

@Kitenite Kitenite added bug Something isn't working good first issue Good for newcomers labels Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant