swup / preload-plugin

A swup plugin for preloading pages to speed up navigation 🚀
https://swup.js.org/plugins/preload-plugin
MIT License
14 stars 14 forks source link

Fix `mouseover` being fired multiple times on links with complex (nested) markup #50

Closed hirasso closed 1 year ago

hirasso commented 1 year ago

Closes #49

Description

As described in the issue, mouseover is being fired multiple times on links with nested markup. Following the research by @daun , we are switching to mouseenter and make sure that event.target matches event.delegateTarget before firing the hoverLink event and starting a preload.

Checks