UC-Davis-molecular-computing / scadnano

Web application for designing DNA structures such as DNA origami.
https://scadnano.org
MIT License
23 stars 13 forks source link

make menu dropdown and context menu scrollable when insufficient y space #983

Open dave-doty opened 2 months ago

dave-doty commented 2 months ago

Some other elements, such as the edit mode selector and the pop-up dialogs (and now on the branch 419-migrate-to-dart-null-safety-mode, the dropdown menus from the top of the screen), automatically get a vertical scrollbar when there is not enough space, due to the css property overflow-y: auto;:

image

If I try this with the css class context-menu, I see this"

image

Not only does it not add a vertical scrollbar as needed, it adds an unnecessary horizontal scrollbar. In fact it even adds it when there is lots of space in both directions:

image

Very confusingly, we needed a vertical scrollbar in the first case and didn't get it, and did not need it in the second case but did get it.

I'd also like to do the same with the menu, e.g., if you click "View" and there's not much vertical space, then a scrollbar should appear. But I have the same problem with the menu: it introduces an unwanted horizontal scrollbar as well, even when it is not needed.