Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "[Fabric] Fixing Clipped Property for Modal Component",
"packageName": "react-native-windows",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Copy link
Contributor

@sundaramramaswamy sundaramramaswamy Oct 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks, it's very readable now :)

Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,18 @@ HRESULT __stdcall CompositionDynamicAutomationProvider::GetPropertyValue(PROPERT
}
case UIA_IsOffscreenPropertyId: {
pRetVal->vt = VT_BOOL;
pRetVal->boolVal = (compositionView->getClipState() == ClipState::FullyClipped) ? VARIANT_TRUE : VARIANT_FALSE;

// Check if element is offscreen - consider modal content special case
bool isOffscreen = (compositionView->getClipState() == ClipState::FullyClipped);

// Modal content may appear clipped but is visible in its own window
if (isOffscreen) {
if (const auto hwnd = compositionView->GetHwndForParenting()) {
isOffscreen = !(IsWindowVisible(hwnd) && !IsIconic(hwnd));
}
}

pRetVal->boolVal = isOffscreen ? VARIANT_TRUE : VARIANT_FALSE;
break;
}
case UIA_HelpTextPropertyId: {
Expand Down
Loading