From 4775390f88cca1b7861eb8cf7c1c0e03e94aa961 Mon Sep 17 00:00:00 2001 From: chenxi Date: Wed, 28 Oct 2026 15:20:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=81=BF=E5=85=8D=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E5=8C=96=E5=BE=85=E5=8A=9E=E6=97=A5=E6=9C=9F=E5=BC=B9=E5=B1=82?= =?UTF-8?q?=E8=B7=B3=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/systemization-todos.blade.php | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/resources/views/business/pages/systemization-todos.blade.php b/resources/views/business/pages/systemization-todos.blade.php index fd162ea2..3ce5a15b 100644 --- a/resources/views/business/pages/systemization-todos.blade.php +++ b/resources/views/business/pages/systemization-todos.blade.php @@ -77,7 +77,7 @@ .sys-todo-grid-value.is-dirty { background:#fff8e8; } .sys-todo-grid-editor { display:block; box-sizing:border-box; width:100%; min-height:1.9rem; padding:.3rem .4rem; border:0; border-radius:.28rem; background:#fff; color:#171717; font:inherit; font-size:.78rem; line-height:1.5; outline:none; resize:vertical; } textarea.sys-todo-grid-editor { min-height:4rem; } - .sys-todo-grid-date-editor { position:fixed; top:0; left:0; z-index:45; display:grid; box-sizing:border-box; width:min(18rem,calc(100vw - 1rem)); padding:.55rem; border:1px solid var(--sys-border); border-radius:.55rem; background:#fff; box-shadow:0 6px 18px rgba(23,23,23,.16); gap:.45rem; } + .sys-todo-grid-date-editor { position:fixed; top:0; left:0; z-index:45; display:grid; box-sizing:border-box; width:min(18rem,calc(100vw - 1rem)); max-height:calc(100vh - 1rem); padding:.55rem; border:1px solid var(--sys-border); border-radius:.55rem; background:#fff; box-shadow:0 6px 18px rgba(23,23,23,.16); gap:.45rem; overflow-y:auto; overscroll-behavior:contain; } .sys-todo-grid-date-editor .upstream-data-date { width:100%; } .sys-todo-grid-date-editor .upstream-data-date input { height:2rem; font-size:.75rem; } .sys-todo-grid-date-editor .upstream-data-date__pick { height:2rem; } @@ -2759,9 +2759,19 @@ viewportWidth - width - 8 )); var below = anchor.bottom + 4; - var above = anchor.top - height - 4; - var top = below + height <= viewportHeight - 8 ? below : above; - top = Math.max(8, Math.min(top, viewportHeight - height - 8)); + var top = below; + if (below + height > viewportHeight - 8) { + var sideTop = Math.max(8, Math.min(anchor.top, viewportHeight - height - 8)); + if (anchor.left - width - 8 >= 8) { + left = anchor.left - width - 8; + top = sideTop; + } else if (anchor.right + width + 8 <= viewportWidth - 8) { + left = anchor.right + 8; + top = sideTop; + } else { + top = sideTop; + } + } wrapper.style.left = Math.round(left) + 'px'; wrapper.style.top = Math.round(top) + 'px'; } -- 2.47.2