Fix virtual scrolling MenuList font family dropdowns shrinking when wider content is unmounted (#3987)

* Fix virtual scrolling MenuList dropdowns shrinking when wider content goes away

* Code review fixes

* Fix small CI workflow bug

* Stop scrolling in dropdowns from horizontally scrolling the control bar

* Use more robust way of getting commit hash in CI workflow
This commit is contained in:
Keavon Chambers
2026-04-02 19:24:41 -07:00
committed by GitHub
parent ab822afae4
commit 5edb00bd9a
4 changed files with 40 additions and 4 deletions

View File

@@ -225,7 +225,7 @@ export function onWheelScroll(e: WheelEvent, editor: EditorWrapper) {
// Redirect vertical scroll wheel movement into a horizontal scroll on a horizontally scrollable element
// There seems to be no possible way to properly employ the browser's smooth scrolling interpolation
const horizontalScrollableElement = e.target instanceof Element && e.target.closest("[data-scrollable-x]");
const horizontalScrollableElement = e.target instanceof Element && !e.target.closest("[data-scrollable-y]") && e.target.closest("[data-scrollable-x]");
if (horizontalScrollableElement && e.deltaY !== 0) {
horizontalScrollableElement.scrollTo(horizontalScrollableElement.scrollLeft + e.deltaY, 0);
return;