Dropdowns problem in Bootstrap 4.2.1

Has anyone else found their drop downs have stopped working since Bootstrap 4.2.1? The console shows the following error

Uncaught DOMException: Failed to execute 'querySelector' on 'Document': 'javascript:void(0)' is not a valid selector.

The issue seems to be documented here but I can’t get any of the fixes working :frowning:

I know this isn’t a Wappler issue, just a side effect. Really liking the new form stuff in this update :slight_smile:

Hello @Glyn
I just tested a simple navbar with a dropdown and it works fine.

I think it’s just a problem when the href of the dropdown is set to javascript:void(0) if it’s set to the default # there are no issues:

Wappler creates this, which works fine:
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" id="dropdown1" role="button" aria-haspopup="true" aria-expanded="false">Dropdown</a>

Thanks Teodor, I’ve figured it out now. The theme I was using had javascript:void(0) all through it, so I’ve replaced all instances with # and it works ok now :slight_smile: It seems if any drop downs in the page are set like this, even if that particular one isn’t clicked it causes the issue.

1 Like