ITADN

Goto suggestions remain visible when dialog is closed in Slidev 51

#2593Opengeraw 创建于 2026-05-10
G
gerawcommented
## Description After upgrading from `@slidev/cli` `0.49.29` to `51.1.0`, the goto dialog suggestions list can remain visible on the page even when the goto dialog is logically closed. The UI looks as if the user pressed `g`: the slide list appears in the top-right area. Pressing `Esc` does not hide it, because the dialog is already in the closed state. ## Environment - Slidev: `@slidev/cli` `51.1.0` - Previous working version: `0.49.29` - Deployment: static build served from GitHub Pages - Router mode: `hash` - Browser observed: Chromium-based browser ## Reproduction context This was observed in a public Slidev deck after upgrading Slidev: - Broken/current deck: https://geraw.github.io/CyberPuzzlesCourse/gated-automata/ - Source repository: https://github.com/geraw/CyberPuzzlesCourse The issue was not present in the same project before the Slidev upgrade. ## Observed DOM/CSS behavior When the goto dialog is closed, the root element has the expected closed class: ```html <div id="slidev-goto-dialog" class="fixed right-5 transition-all -top-20"> ``` However, the suggestions list remains mounted and has a large height. In the inspected page: - `#slidev-goto-dialog` had `top: -80px` - `#slidev-goto-dialog` height became about `666px` - `.autocomplete-list` height was about `620px` - the list remained visible below the `-80px` offset So the dialog is technically closed, but the autocomplete list overflows into the viewport. ## Expected behavior When the goto dialog is closed, no part of the autocomplete suggestions list should be visible or interactive. ## Actual behavior The suggestions list remains visible even though the dialog is in the closed state. Pressing `Esc` does not help because the component already has the closed class. ## Workaround I worked around it in project CSS with: ```css #slidev-goto-dialog.-top-20 { overflow: hidden; height: 2.625rem; } #slidev-goto-dialog.-top-20 .autocomplete-list { display: none; } ``` This suggests the component may need to hide/unmount the autocomplete list when closed, or apply an equivalent overflow/height rule to the closed state. ## Notes This appears to be a regression from Slidev `0.49.29` to `51.1.0`, likely in the goto/autocomplete component behavior or styling.
1 条评论