fix focus scroll layering

This commit is contained in:
Thomas Camlong committed 2026-08-03 12:21:31 +02:00
1 parent 09e9cd4388
commit a2f5668c44
8 files changed
+44 -26

No files matched your search

@@ -28,7 +28,7 @@ export const DiskUsage = ({ system, fontSize, progressSize, valueMiw, valueGap =
{formatPercent(system.disk)}
</Text>
<HoverCard
zIndex={getDefaultZIndex("popover") - 3}
zIndex={getDefaultZIndex("modal") - 3}
position="right"
withArrow
shadow="md"
@@ -57,7 +57,7 @@ interface PortalTooltipProps {
}
const MARGIN = 14;
const TOOLTIP_Z_INDEX = getDefaultZIndex("modal");
const BACKGROUND_TOOLTIP_Z_INDEX = getDefaultZIndex("modal") - 3;
const PortalTooltipContent = ({ active, label, payload, formatter, showTotal }: PortalTooltipProps) => {
const mouseRef = useRef({ x: 0, y: 0 });
@@ -123,7 +123,7 @@ const PortalTooltipContent = ({ active, label, payload, formatter, showTotal }:
position: "fixed",
left: pos.x,
top: pos.y,
zIndex: pos.isAdvanced ? getDefaultZIndex("popover") : TOOLTIP_Z_INDEX,
zIndex: pos.isAdvanced ? getDefaultZIndex("modal") : BACKGROUND_TOOLTIP_Z_INDEX,
pointerEvents: "none",
};
-10
View File
@@ -46,16 +46,6 @@ describe("getWidgetQueryKeys", () => {
});
describe("supportsAdvancedFocus", () => {
const definition = { supportsAdvancedFocus: undefined } as Parameters<typeof supportsAdvancedFocus>[0];
test("defaults to enabled", () => {
expect(supportsAdvancedFocus(definition)).toBe(true);
});
test("allows widgets to opt out", () => {
expect(supportsAdvancedFocus({ ...definition, supportsAdvancedFocus: false })).toBe(false);
});
test.each([appDefinition, beszelSystemGridDefinition, beszelSystemTableDefinition])(
"keeps non-enhanced widgets compact",
(widgetDefinition) => {