Closed distantnative closed 3 years ago
As a solution; Then if the dropdown content is greater than the height of the window or so close, the dropup will not enabled.
Probably rather: (dropdown content height + offset top of dropdown) > window height
Probably rather: (dropdown content height + offset top of dropdown) > window height
Actually we are using already this calculation to show correctly wherever the dropdown is on the page. https://github.com/getkirby/kirby/blob/master/panel/src/components/Navigation/DropdownContent.vue#L147-L148
I have a solution for this issue. I'll create a PR.
Ah true. We would need: "AND dropdown height < scroll top"
@distantnative Currently dropup feature broken with .k-panel-view
changed to static position from absolute in #3492 🙂
Oh sorry that I broke it. Why doesn't it work with a static positioned view?
.k-panel-view
was working on getting visible window height. Currently returns whole page height not visible. Maybe this could be my mistake in implementation. I've changed the dropup
implementation on getting visible window height.
✅
When the browser window is very narrow (e.g. developer tools are open), drop gets triggered - which makes it worse than normal dropdown partially hidden.