fix: stop Tab landing on plugin frames that show nothing

This commit is contained in:
Linus Rath
2026-11-03 08:04:12 +01:00
parent 88f3402068
commit 39d1be497e
+3 -2
View File
@@ -190,8 +190,9 @@ export function PluginIframeSlot({ pluginId, slot, extraProps, fill = false, min
<div
ref={wrapperRef}
style={inline
? { display: 'inline-block', verticalAlign: 'middle', height, width: width ?? 0, maxWidth: '100%', overflow: 'hidden' }
: fill ? { flex: '1 1 0%', minHeight: minFillHeight ?? 0 } : { height, minHeight: height }}
? { display: 'inline-block', verticalAlign: 'middle', height, width: width ?? 0, maxWidth: '100%', overflow: 'hidden', visibility: height > 0 ? undefined : 'hidden' }
// A frame with nothing to show must not be a stop for Tab, where the focus would vanish.
: fill ? { flex: '1 1 0%', minHeight: minFillHeight ?? 0 } : { height, minHeight: height, visibility: height > 0 ? undefined : 'hidden' }}
data-plugin-iframe-slot={`${pluginId}:${slot}`}
data-plugin-iframe-fill={fill || undefined}
/>