How to disable native tooltip for links in Microsoft Edge

筅森魡賤 提交于 2019-12-24 05:29:07

问题


In Microsoft Edge, when you touch and hold a link, a native tooltip is displayed showing the address (href) of the link. For example:

<a href="http://www.google.com">Google</a>

If you tap and hold the link in Edge, a tooltip will pop up saying "www.google.com". I'd like to prevent this tooltip from displaying.

I've tried catching the MSHoldVisual and contextmenu events and calling event.preventDefault() for them, as recommended for IE 10 on MSDN and by another Stack Overflow question (Is it possible to disable tooltips for links?). But both of those deal with IE 10, and the solution doesn't work for Edge.

I've also determined that removing the href entirely can prevent the tooltip from showing up, but that's not feasible for my scenario.

Are there any other known ways to prevent this tooltip in Edge?

来源:https://stackoverflow.com/questions/37470062/how-to-disable-native-tooltip-for-links-in-microsoft-edge

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!