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 Missing Features

See original GitHub issue

Howdy,

Dropdown is missing some features from the jquery bootstrap library

  • Support input/textarea in dropdown (click without closing)
  • Arrow key navigation, ui-bootstrap handles this incorrectly and the page still scrolls when using arrows.
  • Not close when clicking a disabled dropdown element
  • Close on outside touch/tap (mobile). Current document:click is mouse only and IMO not a great option as it fires for every click for every dropdown active on your page. It also makes it more difficult to control what to auto close for as it loses track of where clicks are happening inside the dropdown vs outside.

I’ve got some of these features on my own implementation that I no longer want to maintain and would rather use this project. https://scttcper.github.io/ng2-bs-dropdown

I can make a pull request, but pretty much all of them require moving away from document:click towards another solution. I’ve placed a div with .dropdown-backdrop (like jquery bootstrap) that captures both taps and clicks when the dropdown is open, however this also catches the click and prevents clicks on lower levels from happening. So on

<button>Outside</button><div ngbDropdown [open]="true"></div>

the button won’t be clicked because the dropdown-backdrop captures the click, so button requires two clicks to activate. It could be possible to show the backdrop only when a touchstart is detected that way it’s only shown for mobile users.

Let me know your thoughts.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
marcaljcommented, Sep 7, 2016

@scttcper Please add dropdown-append-to-body to the list 😃

4reactions
pkozlowski-opensourcecommented, Nov 3, 2016

@scttcper thnx for coming back to us on this one - glad to hear that things work for you. Feel free to open separated, focused issues if you feel like we could add more.

@MrCroft feel free to open a separate issue for an additional option to distinguish outside vs. internal clicks. This should be easy to add.

More generally we want to have this library shine so if you guys see any glitches or things to improve please open issues (or better yet - send PRs 😃)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved: Dropdown-control missing from PowerApps for Teams
Solved: Hello, I am building an app via PowerApps in Teams. I would like to use a dropdown control but I can't find...
Read more >
Missing Options in Dropdown List - Jotform
I HAVE MULTIPLE STORES LISTED AND WAS ABLE TO USE THE DROPDOWN LIST TO SELECT A STORE FROM THE LIST AND NOW WE...
Read more >
Dropdown menu items missing in website builder html - Mobirise
I like the basic concept of Mobirise website builder html, however there's one important feature missing: dropdown menu items.
Read more >
Issue type dropdown missing values - Atlassian Community
Few issuetypes are missing from issue type screen scheme to the issue creation dropdown. Can someone suggest possible reason?
Read more >
Excel Data Validation Tips and Troubleshooting - Contextures
--Drop Down Opens With Blank Selected · --Missing Items in Drop Down · --Missing Arrows · --Valid Entries Not Allowed · --Invalid Entries...
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