Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] WebView.Reload does not work #7312

Closed
matibak opened this issue Aug 29, 2019 · 3 comments
Closed

[Bug] WebView.Reload does not work #7312

matibak opened this issue Aug 29, 2019 · 3 comments
Labels
a/webview s/unverified New report that has yet to be verified t/bug 🐛

Comments

@matibak
Copy link

matibak commented Aug 29, 2019

Description

When I set a new value of WebView's source and call Reload() method the page that was set initially gets refreshed.

Steps to Reproduce

  1. Set a new address to a WebView, e.g. webView.Source = new UrlWebViewSource { Url = "https://www.youtube.com" };
  2. Reload it with webView.Reload();

Expected Behavior

When I set a new value of WebView's source and call Reload() method the new page loads into WebView.

Actual Behavior

When I set a new value of WebView's source and call Reload() method the page that was set initially gets refreshed.

Basic Information

  • Version with issue: 4.2.0.618605-pre2
  • Last known good version: unknown
  • IDE: Visual Studio Community 2019 for Mac (Preview) Version 8.3 Preview (8.3 build 1290)
  • Platform Target Frameworks:
    • iOS: 12.1
    • Android: API 28
  • Nuget Packages:
  • Affected Devices:

Screenshots

WebView Reload Bug

Reproduction Link

WebViewReloadBug

@matibak matibak added s/unverified New report that has yet to be verified t/bug 🐛 labels Aug 29, 2019
@rmarinho
Copy link
Member

Why are you calling Reload? just setting source updates to the Youtube url no need to call Reload.

@postnik0706
Copy link

@rmarinho @samhouts OP was probably calling Reload() as an attempt to get Source assignment work. Nothing of that works, actually. The web page is not updated.

@postnik0706
Copy link

postnik0706 commented Jul 28, 2023

Scheduling Source property assignment with Dispatcher works - even though the original code was executing in the main thread. Below is what worked for me.

        private void NextButton_OnClicked(object sender, EventArgs e)
        {
            MainThread.BeginInvokeOnMainThread(() =>
               {
                   webView.Source = new UrlWebViewSource { Url = "https://www.youtube.com" };
               });
        }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/webview s/unverified New report that has yet to be verified t/bug 🐛
Projects
None yet
Development

No branches or pull requests

4 participants