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 · 6 comments
Open

[bug] Issue deleting and duplicating frames #932

Kitenite opened this issue Dec 26, 2024 · 6 comments
Assignees
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
@alexandreantunesmnds
Copy link
Contributor

Hi, can you assign me on this please ?

@Kitenite
Copy link
Contributor Author

Kitenite commented Jan 5, 2025

You got it @alexandreantunesmnds . Long time no see!

@alexandreantunesmnds
Copy link
Contributor

Hi @Kitenite,

Thanks! Long time no see :) I’ve read through your issue, but I’m not entirely sure I fully understand it yet.

I've tried to reproduce the error following your steps, but I couldn't encounter the same issue.

When you mention that the second frame’s webview becomes the third frame’s webview after deletion, could you clarify if this means the actual instance is being reused, or if there’s a mix-up in state (like IDs or dimensions)?

Could you also expand on how the navigation history is handled and why it’s lost in this case?

Let me know if I’ve misunderstood anything or if you can provide additional context

@Kitenite
Copy link
Contributor Author

Kitenite commented Jan 7, 2025

Hey @alexandreantunesmnds,This was reported by another contributor so I can try to give it a better reproduction.

In the meantime, would you want to pick something like this one up? It's a little bit more nebulous but we actually want to be able to remove CSS attributes instead of only being able to overwrite them.

#920

@alexandreantunesmnds
Copy link
Contributor

@Kitenite Thank you for your response!
I’d be happy to work on issue #920 if you can assign it to me. I’ll review the details and start investigating how to enable removing CSS attributes as described

@Kitenite
Copy link
Contributor Author

Kitenite commented Jan 8, 2025

@alexandreantunesmnds for sure if you can drop a comment there I can add you to it

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

2 participants