Fix IconSelect grid overflow and scroll jump

- Set maxHeight dynamically based on available viewport space
- Clamp popup horizontally to stay within viewport
- Remove max-height CSS transition that caused scroll jumps
- Auto-close popup on ancestor scroll to prevent stale positioning

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-10 11:07:38 +03:00
parent 37c80f01af
commit 7b4b455c7d
2 changed files with 60 additions and 25 deletions

View File

@@ -618,19 +618,15 @@ textarea:focus-visible {
.icon-select-popup {
position: fixed;
z-index: 10000;
max-height: 0;
overflow: hidden;
opacity: 0;
transition: max-height 0.2s ease, opacity 0.15s ease, margin 0.2s ease;
margin-top: 0;
transition: opacity 0.15s ease;
pointer-events: none;
}
.icon-select-popup.open {
max-height: 600px;
opacity: 1;
margin-top: 6px;
}
.icon-select-popup.open.settled {
overflow-y: auto;
pointer-events: auto;
}
.icon-select-grid {