question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Dropdown] - Scrollbar should be always visible on mobile

See original GitHub issue

Steps to Reproduce

  1. Create a dropdown menu with more than 4 items.
  2. Open the dropdown on mobile device (maybe Android works, I have tested iOS only).
  3. Be shocked that apparently only four options are available!

Expected The scrollbar inside the dropdown menu should be visible to indicate that there are more than 4 items to choose from.

Result The dropdown menu shows only 4 items without any hint that there are more. Only after touching the menu it becomes clear that you can scroll down for more items.

Testcase http://jsfiddle.net/j08rb5jr/ http://jsfiddle.net/j08rb5jr/embedded/result/ (Mobile link)

Even the scrolling variation which sounds as it would solve this, shows no scrollbar without touching the dropdown menu ☹️ (second example in test case, it just shows 6 instead of 4 items by default).

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
lubber-decommented, Oct 6, 2022

We prepared a little swipe animation to the right of the dropdown (where the scrollbar should appear) in the community fork Fomantic-UI by https://github.com/fomantic/Fomantic-UI/pull/1651 You only have to add scrollhint class to the dropdown menu

Check here (using an iOS device): https://raw.githack.com/lubber-de/fomantic-ui/jsfiddlefullscreen/jsfiddle/#!lubber/2mcak7xr/167/

iosscrollhint

1reaction
leonidas-ocommented, Jul 5, 2017

As a fast workaround, and if someone wants to submit a PR. To have the 1/2 of the next item solution to indicate there is more, change the max-height from:

@media only screen and (max-width: 767px) {
    .ui.selection.dropdown .menu {
        max-height: 8.01428571rem; /* + 1.335714285 to 9.349999995rem */
    }
}
@media only screen and (min-width: 768px) {
    .ui.selection.dropdown .menu {
        max-height: 10.68571429rem; /* + 1.3357142863 to 12.0214285763rem */
    }
}
@media only screen and (min-width: 992px) {
    .ui.selection.dropdown .menu {
        max-height: 16.02857143rem; /* + 1.3357142858 to 17.3642857158rem */
    }
}
@media only screen and (min-width: 1920px) {
    .ui.selection.dropdown .menu {
        max-height: 21.37142857rem; /* + 1.3357142856 to 22.7071428556rem */
    }
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Making the main scrollbar always visible - Stack Overflow
This will always show an ACTIVE vertical scroll bar in every page, vertical scrollbar will be scrollable only of few pixels.
Read more >
How To Force (Always Show) Scrollbars With CSS - W3Schools
Learn how to always show scrollbars with CSS. ... Force / Always Show Scrollbars. Add overflow: scroll; to show both the horizontal and...
Read more >
Scrollable nav and dropdown menu in mobile - Forum | Webflow
Hi, my drop down menu on my mobile phone does not scroll down fully. I have set the Height of the NavMenu to...
Read more >
overflow - CSS: Cascading Style Sheets - MDN Web Docs
The overflow CSS shorthand property sets the desired behavior for an element's overflow — i.e. when an element's content is too big to...
Read more >
Prototype scrolling with overflow behavior - Figma Help Center
Animated image showing a vertically scrolling prototype in presentation view. Note: You won't always need to apply overflow behavior to mimic vertical ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found