Browse Source

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

pull/17765/merge
Emmanuel Hansen 1 month ago
committed by GitHub
parent
commit
fe060db106
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 3
      src/Avalonia.Controls/TopLevel.cs

3
src/Avalonia.Controls/TopLevel.cs

@ -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)

Loading…
Cancel
Save