-
-
Notifications
You must be signed in to change notification settings - Fork 79.2k
Open
Description
Prerequisites
- I have searched for duplicate or closed issues
- I have validated any HTML to avoid common problems
- I have read the contributing guidelines
Describe the issue
Uncaught SyntaxError: Failed to execute 'querySelector' on 'Element': '#3.9' is not a valid selector.
bootstrap/js/src/dom/selector-engine.js
Lines 40 to 42 in c82919e
| findOne(selector, element = document.documentElement) { | |
| return Element.prototype.querySelector.call(element, selector) | |
| }, |
Reduced test cases
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap demo</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB" crossorigin="anonymous">
</head>
<body>
<nav id="nav"><a href="#3.9">3.9</a></nav>
<section data-bs-spy="scroll" data-bs-target="#nav"><h1 id="3.9">3.9</h1></section>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI" crossorigin="anonymous"></script>
</body>
</html>What operating system(s) are you seeing the problem on?
Windows
What browser(s) are you seeing the problem on?
Chrome
What version of Bootstrap are you using?
5.3.8
Metadata
Metadata
Assignees
Labels
No labels