Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offcanvas: Cannot be Opened From Link That Contains <i>...</i> Tags #33654

Closed
gahorn opened this issue Apr 15, 2021 · 1 comment
Closed

Offcanvas: Cannot be Opened From Link That Contains <i>...</i> Tags #33654

gahorn opened this issue Apr 15, 2021 · 1 comment

Comments

@gahorn
Copy link

gahorn commented Apr 15, 2021

OS: Windows 10
Browsers: Edge Version 89.0.774.76, Chrome Version 90.0.4430.72

Links and buttons cannot show offcanvas when they contain text with <i> tags. This e. g. prevents the use of icons via icon fonts.

Example:

<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css" rel="stylesheet"
          integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" crossorigin="anonymous">
    <title>Hello, world!</title>
</head>
<body>

<div class="offcanvas offcanvas-start" id="foo">
    TEST
</div>

<a href="#foo" data-bs-toggle="offcanvas">works</a>
<a href="#foo" data-bs-toggle="offcanvas"><i>DOES NOT WORK</i></a>
<a href="#foo" data-bs-toggle="offcanvas">click <i>!EXACTLY HERE!</i> does not work</a>

<button data-bs-toggle="offcanvas" data-bs-target="#foo">
    same behavior as link - click <i>!EXACTLY HERE!</i> does not work - rest does
</button>

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js"
        integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf"
        crossorigin="anonymous"></script>
</body>
</html>
@devhoussam
Copy link
Contributor

OS: Windows 10
Browsers: Edge Version 89.0.774.76, Chrome Version 90.0.4430.72

Links and buttons cannot show offcanvas when they contain text with <i> tags. This e. g. prevents the use of icons via icon fonts.

Example:

<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css" rel="stylesheet"
          integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" crossorigin="anonymous">
    <title>Hello, world!</title>
</head>
<body>

<div class="offcanvas offcanvas-start" id="foo">
    TEST
</div>

<a href="#foo" data-bs-toggle="offcanvas">works</a>
<a href="#foo" data-bs-toggle="offcanvas"><i>DOES NOT WORK</i></a>
<a href="#foo" data-bs-toggle="offcanvas">click <i>!EXACTLY HERE!</i> does not work</a>

<button data-bs-toggle="offcanvas" data-bs-target="#foo">
    same behavior as link - click <i>!EXACTLY HERE!</i> does not work - rest does
</button>

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js"
        integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf"
        crossorigin="anonymous"></script>
</body>
</html>

Duplicate #33457

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants