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

Back/Forward navigation don't work as expected for iframe navigations #1492

Closed
Desz5 opened this issue Jul 4, 2021 · 9 comments
Closed

Back/Forward navigation don't work as expected for iframe navigations #1492

Desz5 opened this issue Jul 4, 2021 · 9 comments
Assignees
Labels
bug Something isn't working tracked We are tracking this work internally.

Comments

@Desz5
Copy link

Desz5 commented Jul 4, 2021

Hello,
I'm using VB.NET and Winforms and i'm trying to go forward in WebView2, i can go back but it doesn't allow me to navigate forward.
The page that i'm navigating has frames.
I've put the following code in the HistoryChanged event, the SourceChanged event and in the FrameNavigationCompleted event.

If WebView_Browser1.CanGoForward = True Then
MsgBox("yes")
Else
MsgBox("no")
End If

The event always returns 'no' even if i can goforward using ALT+Right.
and when i call WebView_Browser1.goForward() it never works.
Everything is working great with goBack.
With Edge i can navigate forward and back.
Am i doing something wrong or is this a bug?
Thank you!

AB#34509102

@Desz5 Desz5 added the question label Jul 4, 2021
@champnic
Copy link
Member

champnic commented Jul 9, 2021

Hey @Desz5 - I just tried this in a sample app and it works fine for me. It's possible that you can't navigate forwards if it's just a frame navigation. Are you getting a "NavigationCompleted" event? Does this work if you navigate to top-level sites?

@Desz5
Copy link
Author

Desz5 commented Jul 10, 2021

Hey @champnic - top-level navigation works. But when i'm testing on a page that has a frame i can't go forward.
I'm getting a "FrameNavigationCompleted" event, not a "NavigationCompleted" event. It will navigate forward using the old webbrowser. Just not with the WebView2 browser. Thank you!

@champnic
Copy link
Member

@Desz5 Thanks for confirming! If you load that page in Edge or Chrome do you get a similar behavior, or does it let you do a forward navigation just for the frame?

It's possible that WebBrowser (based on the Internet Explorer engine) and WebView2 (based on Chromium) have different notions about going forwards and backwards.

@champnic champnic self-assigned this Jul 12, 2021
@Desz5
Copy link
Author

Desz5 commented Jul 13, 2021

@champnic if i load that page in Edge or Chrome i can do forward navigation just for the frame. Thank you!

@champnic
Copy link
Member

Do you have a sample page or website that exhibits this behavior that I can try out?

@Desz5
Copy link
Author

Desz5 commented Jul 13, 2021

It's called Exact, you need to login to get access. We use it at work. It's a website that uses a top frame and a bottom frame and the top frame remains steady, and the bottom frame navigates. Here's a screenshot if that helps: https://www.exact.com/images/Releases/2019/spring/afronden-naar-standaard-seriegrootte.jpg Thank you!

@champnic
Copy link
Member

@Desz5 I was able to reproduce the issue. I'm going to change this to a bug and open it on our backlog. Thanks!

@champnic champnic added bug Something isn't working and removed question labels Jul 13, 2021
@champnic champnic changed the title CanGoForward and GoForward not working? Back/Forward navigation don't work as expected for iframe navigations Jul 13, 2021
@champnic champnic added the tracked We are tracking this work internally. label Jul 13, 2021
@Desz5
Copy link
Author

Desz5 commented Jul 13, 2021

Thank you!

@champnic
Copy link
Member

This is fixed in runtimes 100.0.1163.0+. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tracked We are tracking this work internally.
Projects
None yet
Development

No branches or pull requests

2 participants