Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/Android/Avalonia.Android/AvaloniaAccessHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using Avalonia.Automation;
using Avalonia.Automation.Peers;
using Avalonia.Automation.Provider;
using Avalonia.Controls;
using Java.Lang;

namespace Avalonia.Android
Expand Down Expand Up @@ -208,8 +209,8 @@ protected override void OnPopulateNodeForVirtualView(int virtualViewId, Accessib
// On-screen bounds
Rect bounds = peer.GetBoundingRectangle();
PixelRect screenRect = new PixelRect(
_view.TopLevelImpl.PointToScreen(bounds.TopLeft),
_view.TopLevelImpl.PointToScreen(bounds.BottomRight)
_view.TopLevelImpl.InputRoot?.RootElement.PointToScreen(bounds.TopLeft) ?? default,
_view.TopLevelImpl.InputRoot?.RootElement.PointToScreen(bounds.BottomRight) ?? default
);
nodeInfo.SetBoundsInScreen(new(
screenRect.X, screenRect.Y,
Expand Down
Loading