-
Notifications
You must be signed in to change notification settings - Fork 436
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable InstantClick for touch events (#1167)
* Check if prefetch request is still valid on mouseleave and touchend events If it's not and the prefetch delay is not over, we cancel the prefetch request. * Disable InstantClick on touch devices After testing this on iPhone, it seems it can lead to duplicated requests on touch devices. The culprit seems a `mouseenter` that Safari fires after a `touchend` event for compatibility reasons. According to ChatGPT: > Some browsers may synthesize mouse events (including mouseenter) after > touch events to ensure compatibility with web content not designed for > touch interfaces. This means that a mouseenter event might be fired on > a touch device, usually after a touchend event, as part of the sequence > to simulate mouse interaction. This behavior can vary between browsers > and might not always be consistent. Co-Authored-By: Sean Doyle <[email protected]> * Remove obsolete tests * Rename method --------- Co-authored-by: Sean Doyle <[email protected]>
- Loading branch information
1 parent
3c3eeb8
commit 52c8533
Showing
2 changed files
with
18 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters