diff --git a/apps/web/src/views/LeadsView.vue b/apps/web/src/views/LeadsView.vue index 1e09d1d..ec749c2 100644 --- a/apps/web/src/views/LeadsView.vue +++ b/apps/web/src/views/LeadsView.vue @@ -301,12 +301,12 @@ function toggleFilterSection(name: NonNullable) { const filterAnchor = ref(null); const filterPopoverMaxHeight = ref('min(70vh, 32rem)'); -const filterPanelPos = ref({ top: 0, inlineEnd: 8 }); +const filterPanelPos = ref({ top: 0, left: 8 }); const filterPanelStyle = computed(() => ({ position: 'fixed' as const, top: `${filterPanelPos.value.top}px`, - insetInlineEnd: `${filterPanelPos.value.inlineEnd}px`, + left: `${filterPanelPos.value.left}px`, zIndex: 1050, width: 'min(20rem, calc(100vw - 1.5rem))', maxHeight: filterPopoverMaxHeight.value, @@ -323,9 +323,15 @@ function placeFilterPopover() { const rect = el.getBoundingClientRect(); const space = Math.floor(window.innerHeight - rect.bottom - 12); filterPopoverMaxHeight.value = `${Math.max(220, space)}px`; + // همان رفتار absolute با inset-inline-end:0 (RTL): لبهٔ چپ پنل = لبهٔ چپ دکمه + const panelW = Math.min(20 * 16, window.innerWidth - 24); + let left = rect.left; + if (left + panelW > window.innerWidth - 8) { + left = window.innerWidth - panelW - 8; + } filterPanelPos.value = { top: rect.bottom + 6, - inlineEnd: Math.max(8, Math.round(window.innerWidth - rect.right)), + left: Math.max(8, Math.round(left)), }; }