Open Ying-6 opened 1 year ago
@japarson @rachelkang @jsuarezruiz this test needs to be rewritten slightly to account for this behavior change
Any news on this?
Verified this issue with Visual Studio 17.10.0 Preview 1. Can repro Android & iOS platform with 8.0.10-nightly.10196
Hi, any news about this? I can reproduce it with Visual Studio 17.9.7 and MAUI 8.0.40 on real Android and iOS device.
Here a repo.
On Android you can override DispatchTouchEvent in the MainActivity like this
public override bool DispatchTouchEvent(Android.Views.MotionEvent e)
{
if(e.Action == Android.Views.MotionEventActions.Down)
{
var v = CurrentFocus;
if(v is EditText || v is TextView)
{
Rect outRect = new Rect();
v.GetGlobalVisibleRect(outRect);
if(!outRect.Contains((int)e.RawX, (int)e.RawY))
{
v.ClearFocus();
}
}
}
return base.DispatchTouchEvent(e);
}
Description
D17 page when click on some empty space, the editor 2 is still focused on ios, maccatalyst and android target.
Steps to Reproduce
Actual result: The editor is still focused after clicking the empty space.
Expected results: The editor should unfocus.
Link to public reproduction project repository
https://github.com/rachelkang/recipeSearch
Microsoft.Maui.Controls 8.0.0-nightly.9331+sha.6aac924e89-azdo.8456294 .NET SDK: 8.0.100-rc.1.23463.5
Version with bug
8.0.0-nightly.9331
Is this a regression from previous behavior?
Not a regression, The issue also repro on 8.0.0-rc.1.9171
Affected platforms
iOS, Android, macOS