android - only handle back event from source toplevel (#20694)

This commit is contained in:
Emmanuel Hansen
2026-02-16 19:17:35 +00:00
committed by GitHub
parent ab5f8fca74
commit fe060db106
+3
View File
@@ -290,6 +290,9 @@ namespace Avalonia.Controls
_backGestureSubscription = _inputManager?.PreProcess.Subscribe(e => _backGestureSubscription = _inputManager?.PreProcess.Subscribe(e =>
{ {
if (e.Root != this)
return;
bool backRequested = false; bool backRequested = false;
if (e is RawKeyEventArgs rawKeyEventArgs && rawKeyEventArgs.Type == RawKeyEventType.KeyDown) if (e is RawKeyEventArgs rawKeyEventArgs && rawKeyEventArgs.Type == RawKeyEventType.KeyDown)