Open cat0363 opened 1 year ago
Hi @cat0363. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md
This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
I have uploaded the code for this issue to github. https://github.com/cat0363/Maui-Issue13634
We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.
Is the same problem with ios.
Hi, @hector2d2 I didn't have an iOS build environment ready yet, so thanks for investigating.
I also confirmed that this issue occurs on iOS as well. .NET MAUI 7.0 (Current) iOS 16.4
Verified this issue with Visual Studio Enterprise 17.7.0 Preview 2.0. Can repro on android platform with sample project. Maui-Issue13634-main.zip
Having the same issue. With .Net 7 on iOS only
I am still seeing this issue in Maui
I am still seeing this issue in Maui
I've hit same issue. I went with the Handler based alternative workaround, which worked well:
Anywhere in /Platforms/Android folder:
public class EditorScrollTouchListener : Java.Lang.Object, View.IOnTouchListener
{
public bool OnTouch(View? v, MotionEvent? e)
{
if (v is AppCompatEditText editText)
{
if (IsTextScrollable(editText))
{
// It is not sufficient to just return false from OnTouch
// you must request this from the parent control also
editText.Parent?.RequestDisallowInterceptTouchEvent(true);
}
}
return false;
}
private bool IsTextScrollable(EditText editText)
{
int textHeight = editText.Layout?.Height ?? 0;
int visibleHeight = editText.Height - editText.PaddingTop - editText.PaddingBottom;
return textHeight > visibleHeight;
}
}
On startup in MauiProgram.cs:
Microsoft.Maui.Handlers.EditorHandler.Mapper.AppendToMapping("EnableVerticalScroll", (handler, view) =>
{
#if ANDROID
handler.PlatformView.VerticalScrollBarEnabled = true;
handler.PlatformView.SetOnTouchListener(new EditorScrollTouchListener());
#endif
});
Thanks for sharing @cat0363
If this issue is related to #9827, is there a specific solution? This Issue also occurred in Xamarin.Forms, but continues to occur in .NET MAUI.
Discussed in https://github.com/dotnet/maui/discussions/13632