This repository was archived by the owner on May 1, 2024. It is now read-only.
[Bug] Calling Focus() on a WebView on UWP does not move the focus to the WebView #12497
Labels
a/webview
e/1 🕐
1
in-progress
This issue has an associated pull request that may resolve it!
p/UWP
t/bug 🐛
Programmatically setting the Focus to a WebView on UWP using XF 4.8 does not work.
Native UWP does support setting Focus to a WebView, but attempting to do the same using Xamarin.Forms 4.8 fails.
Documentation of the UWP Focus API can be found at https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.webview.focus?view=winrt-19041
To demonstrate the problem, use the following code. Push an instance of TestWebViewTabIndexPageView onto the NavigationStack. Pressing the third Button should result in the focus moving to the WebView. It doesn't.
using Xamarin.Forms;
using System.Threading.Tasks;
using System;
namespace ViewsUsingXamarinForms
{
public class TestWebViewTabIndexPageView : ContentPage
{
private bool _firstTimeOnAppearing = true;
}
Basic Information
There is a generic Focus issue already logged at #5616
but I thought it worth raising this one separately, as this one should be easy to fix. The underlying platform supports putting the Focus onto a WebView. It's just a case of hooking it up.
The text was updated successfully, but these errors were encountered: