Skip to content

Commit afd0727

Browse files
authored
Accessibility: Port "GetClickablePoint returns error value when the element is offscreen" from main (#5130)
1 parent 4d50cfa commit afd0727

File tree

1 file changed

+8
-1
lines changed
  • src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers

1 file changed

+8
-1
lines changed

src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/AutomationPeer.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1181,7 +1181,14 @@ public Point GetClickablePoint()
11811181
try
11821182
{
11831183
_publicCallInProgress = true;
1184-
result = GetClickablePointCore();
1184+
if (IsOffscreenCore())
1185+
{
1186+
result = new Point(double.NaN, double.NaN);
1187+
}
1188+
else
1189+
{
1190+
result = GetClickablePointCore();
1191+
}
11851192
}
11861193
finally
11871194
{

0 commit comments

Comments
 (0)