首页 > 解决方案 > Zone.js click event cancels out 3rd tooltip party script event

问题描述

The scenario: An angular 8 app loads in on a webpage. The webpage loads additional 3rd party scripts like the tooltip library.

As described in the title: the problem is the tooltip click event is canceled out by the zone.js click event. Rendering the tooltip library useless. Searching in the angular docs i found you can blacklist zone.js events with:

(window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['click'];

However this is far from ideal, because this will also remove any click related events inside the angular application.

Can we remove the zone.js event for specific elements?

标签: javascriptangularzone.js

解决方案


推荐阅读