linuxmint / linuxmint/cinnamon
Automatic height limit for popup menu doesn't work
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 5.6k
- Forks
- 915
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 3
Description
Distribution
Mint 22.3
Package version
6.6.9
Graphics hardware in use
No response
Frequency
Always
Bug description
I'm currently revamping the applet Drawer and have stumbled across the case where the popup menu gets very tall but instead of had been limited and a scrollbar being shown (as documented here), it just renders off screen (there are two more menu items that can't be seen in the screenshot):
Steps to reproduce
- Clone my repo: https://github.com/s-h-a-d-o-w/show-hide-applets_mohammad-sn
git checkout repeat-popup-menu-items(On this branch, icons are intentionally added multiple times, to ensure that anybody trying this hopefully gets above the maximum height.)./test-spice show-hide-applets@mohammad-sn- Move the applet to the right side of your panel, then right click on it for the menu.
Expected behavior
Height of the menu should be limited, a scrollbar should be shown.
Additional information
UPDATE:
I just noticed that you don't seem to run this._applet_context_menu.setMaxHeight(); internally, as the comment that I linked to says. If I call it in my code, I can see that style is actually set to max-height: 1040px; max-width: 1920px;. But it still doesn't result in a scrollbar getting rendered when that is exceeded.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in js/ui/popupMenu.js around the documented setMaxHeight() logic, then reproduce the issue with the show-hide-applets repository using the repeat-popup-menu-items branch and ./test-spice. Trace the applet context menu's height and scrollbar behavior; done means an oversized popup is constrained and displays a usable scrollbar without requiring the applet to call setMaxHeight() itself.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100