简体   繁体   English

在 Blazor 应用程序中导航后,Bootstrap 工具提示仍然可见

[英]Bootstrap tooltips remain visible after navigation in Blazor app

I'm new to Blazor and client side web development in general.我是 Blazor 和客户端 web 开发的新手。 I have the following block of code in my Blazor app:我的 Blazor 应用程序中有以下代码块:

<h1 class="page-title">
    All Offices 
    <a href="@("office-edit")" class="btn btn-primary table-btn" 
        data-toggle="tooltip" 
        data-placement="top" 
        title="Add new office">
        <i class="fas fa-plus"></i>
    </a>
</h1>

The tooltip works fine when I hover my mouse over it and move away.当我将鼠标悬停在 hover 上并移开时,工具提示工作正常。 However when I click through the link, the tooltip remains visible.但是,当我单击链接时,工具提示仍然可见。 How should I ensure that it disappears?我应该如何确保它消失?

This is not blazer issue.这不是西装外套的问题。 It is out of box feature in bootstrap.它是引导程序中的开箱即用功能。 See bootstrap example section here, you will see similar behaviour.请参阅此处的引导程序示例部分,您将看到类似的行为。

You can change this behaviour by writing your own javascript code.您可以通过编写自己的 javascript 代码来更改此行为。 this link will help you to write own javascript. 链接将帮助您编写自己的 javascript。

I got the same problem and solved in the end with the following link.我遇到了同样的问题,最后通过以下链接解决了。 It may help someone.它可能会帮助某人。

https://stackoverflow.com/a/64308003/10995103 https://stackoverflow.com/a/64308003/10995103

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM