Skip to content

Commit

Permalink
Update packages/kit/src/runtime/client/router.js
Browse files Browse the repository at this point in the history
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
  • Loading branch information
borntofrappe and benmccann authored Dec 13, 2021
1 parent 26d6bcd commit f06924d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/kit/src/runtime/client/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ export class Router {
const handle_mousemove = (event) => {
clearTimeout(mousemove_timeout);
mousemove_timeout = setTimeout(() => {
// ensure event.composedPath() in find_anchor(event) returns an array of EventTarget objects
// event.composedPath(), which is used in find_anchor, will be empty if the event is read in a timeout
// add a layer of indirection to address that
event.target?.dispatchEvent(
new CustomEvent('sveltekit:trigger_prefetch', { bubbles: true })
);
Expand Down

0 comments on commit f06924d

Please sign in to comment.