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.

ComboBox and DropdownV2 cut off by bx--modal-content

See original GitHub issue

Detailed description

When a ComboBox or DropdownV2 component is placed inside of a modal, the bx–modal-content container will clip any dropdown items that extend past its bottom edge when the elements are expanded. You can still scroll down to see them, but on the initial click to expand the element, some or all of the items will appear to be missing. (Tested on Chrome)

Steps to reproduce the issue

  1. Nest a Dropdown or ComboBox component inside of a Modal. Expand the nested component. Unless the expanded component happens to be shorter than the height of bx--modal-content, some or all of its dropdown items will be clipped. See sample code here: https://codesandbox.io/s/2p2w3zpmyr

This dropdown has three elements, but unless you scroll down after opening it, only the first two are visible.

screen shot 2018-10-23 at 10 14 16 am

This ComboBox also has three items. It appears empty because it is positioned as the very last element inside of bx–modal-content. The items are still there, but there’s no visual indication that you need to scroll, and none of the items become visible after you click on the combo box.

screen shot 2018-10-23 at 10 20 39 am

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:12 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
bjones526commented, Oct 29, 2018

@alisonjoseph Are you talking about locking the scrollbar on bx--modal-content so that the scrollbar is always present and gets visibly shorter when the dropdown is open? I see how that could be an improvement since it at least indicates that more content exists, but I’m not really happy with that as a workaround for two reasons. a) you can still get into a scenario where users click on a dropdown and can’t see any items, so it seems broken, and b) it can be a little painful to force visible scrollbars on mac given apple’s preference for making them disappear.

If there’s no way to fix this with css, my preference would be to let the modal listen for changes to its child dropdown components and use javascript to autoscroll its content when needed. The old dropdown component has a set of onOpen and onClose functions that would work, but I don’t think DropdownV2 or ComboBox expose anything like that. Is that something that could be added?

0reactions
dakahncommented, May 14, 2019

Closing this one out as resolved. Let me know if that’s not the case and I can reopen yall 🤠

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dropdown menu is cutting off in jquery ui modal dialog
Using select2 in jquery.ui.dialog . The problem is when the dropdown menu is open ...
Read more >
Styling lightning:combobox drop down to not hide inside ...
I the drop down hides inside the modal content area, and extends the length of the modal so there is a lot of...
Read more >
Dropdown - Multiselect - Carbon Design System
Combo box, Allows the user to make a selection from a list of suggested, ... Dropdowns can be used in forms on full...
Read more >
ComboBox drop-down lists are truncated by their parent 'form ...
Hi, I have a problem with Comboxes when they are displayed in a modal Popup control. When you run the included sample project,...
Read more >
Combobox | Calcite Design System - ArcGIS Developers
Combobox is designed to be used in situations where a dropdown or list has a large amount of choices to sift through. The...
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