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.

I need to double click to open dropdowns.

See original GitHub issue

Hi guys!

_You can test the issue here: http://dev.3818.com.ar/muq-bug-dropdown/_

Recently I had some problems with Popper JS, dropdowns and other elements did not work. I have solved it using the file bootstrap.bundle.min.js of version 4.0.0 of Bootstrap (apparently it has Popper JS included).

However, dropdowns have a strange behavior. When I make the first click in the dropdown, bootstrap adds two attributes.

x-placement="bottom-start"

style="position: absolute; transform: translate3d(0px, 38px, 0px); top: 0px; left: 0px; will-change: transform;"

Then, when I make the second click, I can display the contents of the dropdown.

Details:

Before first click: <div _ngcontent-c2="" aria-labelledby="dropdownMenuButton" class="dropdown-menu">

After first click: <div _ngcontent-c2="" aria-labelledby="dropdownMenuButton" class="dropdown-menu" x-placement="bottom-start" style="position: absolute; transform: translate3d(0px, 31px, 0px); top: 0px; left: 0px; will-change: transform;">

After second click: <div _ngcontent-c2="" aria-labelledby="dropdownMenuButton" class="dropdown-menu show" x-placement="bottom-start" style="position: absolute; transform: translate3d(0px, 31px, 0px); top: 0px; left: 0px; will-change: transform;">

peek 30-01-2018 10-32


Scripts section inside angular-cli.json

captura de pantalla de 2018-01-30 10-38-49


The issue was tested in:

  • Chrome 64.0.3282.119 (Official build) (64 bits)
  • Firefox [Quantum] 58.0 (64-bit)
  • Yandex 17.11.1.1087 beta (64-bit)
  • Vivaldi 1.13.1008.44 (Stable channel) (64 bits)

Project details:

  • Bootstrap 4.0.0
  • bootstrap bundle js
  • Angular 2 (All other styles work well. All my sass works well too.)

Others:

  • OS: Archlinux

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
flashadvocatecommented, Mar 26, 2018

That’s a pretty vague solution

1reaction
lucasromerodbcommented, Jan 30, 2018

@Johann-S Sure. Delete all JS calls from index.html and call it in angular-cli.json I have noticed this solution when reporting the error. Now the dropdowns work well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Avoid having to double-click to toggle Bootstrap dropdown
In Bootstrap 4, bootstrap.min.js and bootstrap.bundle.min.js now conflict in dropdown. By removing bootstrap.min.js , the dropdown double click issue will ...
Read more >
Double Click needed to open dropdown - WordPress.org
Users need to click twice to open the dropdown. Once the dropdown is opened once, it will work fine. I believe there is...
Read more >
Dropdown needs 2 clicks to activate - MDBootstrap
On the first click, the dropdown opens and closes automatically near instantly. However, it opens correctly on second click. Same repeats with 3rd...
Read more >
Need to click twice before re-opening drop down - Custom code
SOLVED: Instead of triggerHandler in the custom code's last line, I needed trigger , because triggerHandler only targets the first element.
Read more >
I have to double click to access menus, drop down doesn't ...
Also I cannot access sub-menus in the drop. ie: FILE > OPEN RECENT. First off I have to double click to access 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