Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#45510 closed defect (bug) (fixed)

Twenty Nineteen: Link are triggered on touchstart instead of touchend

Reported by: panchen's profile panchen Owned by: laurelfulford's profile laurelfulford
Milestone: 5.0.3 Priority: normal
Severity: normal Version: 5.0
Component: Bundled Theme Keywords: has-patch
Focuses: Cc:

Description

Hi,
I am a WordPress lover and I updated my website to WordPress 5.0 and began using TwentyNineteen. Then I found a big bug, that is, on mobile device, if I 'press' the hyperlink, it will jump to the hyperlink immediately! I spent two hours finding 'why' and after creating a totally new WordPress site and creating a primary menu, the problem occurs. So I am pretty sure it is because there are some bugs about TwentyNineteen's Menus.

And it is interesting that Matt's Blog is now using TwentyNineteen too but it seems OK in Matt's Blog. So, it is so weird. But I still think TwentyNineteen has some bugs in Menus settings.

Best wishes!

Attachments (1)

45510.patch (902 bytes) - added by kjellr 6 years ago.
Fix from https://github.com/WordPress/twentynineteen/pull/721 on GitHub. Props: anevins

Download all attachments as: .zip

Change History (13)

#1 @mukesh27
6 years ago

  • Component changed from Themes to Bundled Theme
  • Summary changed from A very big bug about new default theme TwentyNineteen to Twenty Nineteen: A very big bug about new default theme

#2 @kjellr
6 years ago

Thanks for filing the report, @panchen!

on mobile device, if I 'press' the hyperlink, it will jump to the hyperlink immediately

I think what you're saying here is that when using a touch-enabled device, top-level menu links trigger when you first press your finger on them, not when you raise your finger off the screen. Is that correct? In developer terms, the link is triggered on touchstart, not on touchend. Binding the action to touchend is definitely standard behavior, so I do believe that is something we should change.

Can you confirm that's the issue you're reporting here? If so, we can update the issue title to be a little more descriptive of the issue.

Thank you!

#3 @panchen
6 years ago

Yes! The link is triggered on touchstart, not on touchend. And not only top-level menu links trigger immediately after I press my finger on them, but also other links, for example, the titles of posts, the tags of the tag cloud, and so on.

And once I removed the Primary Menu, the problem disappeared.

And for social link menu, everything is OK.

#4 @kjellr
6 years ago

  • Summary changed from Twenty Nineteen: A very big bug about new default theme to Twenty Nineteen: Link are triggered on touchstart instead of touchend

Ok, thanks! I'll update the title of this post to be a little more descriptive.

#5 @panchen
6 years ago

Hi.
After I deleted the touch-keyboard-navigation.js in the /js/ folder of Twenty Nineteen. The problem disappeared. So I think touch-keyboard-navigation.js is what causes the issue.

@kjellr
6 years ago

Fix from https://github.com/WordPress/twentynineteen/pull/721 on GitHub. Props: anevins

#6 @kjellr
6 years ago

  • Keywords has-patch added

#7 @laurelfulford
6 years ago

  • Milestone changed from Awaiting Review to 5.0.3
  • Owner set to laurelfulford
  • Status changed from new to assigned

#8 @laurelfulford
6 years ago

Thanks for the report, @panchen, and for the GitHub report and patch, @anevins!

This also looks good to me and ready to commit - thanks for moving it to Trac, @kjellr!

#9 @laurelfulford
6 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 44357:

Twenty Nineteen: Make sure links are followed on touchend, not touchstart.

The theme's original navigation JavaScript was making it so all links on a site were immediately followed on touchstart when using a touch-enabled device. This update makes sure links are followed at touchend, to improve usability and menu behavior.

Props anevins, panchen, kjellr.
Fixes #45510.

#10 @laurelfulford
6 years ago

In 44358:

Twenty Nineteen: Make sure links are followed on touchend, not touchstart.

The theme's original navigation JavaScript was making it so all links on a site were immediately followed on touchstart when using a touch-enabled device. This update makes sure links are followed at touchend, to improve usability and menu behavior.

Already committed to the 5.0 branch in [44357].

Props anevins, panchen, kjellr.
Fixes #45510.

#11 @laurelfulford
6 years ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for merging to the 5.0 branch.

#12 @laurelfulford
6 years ago

  • Keywords fixed-major removed
  • Resolution set to fixed
  • Status changed from reopened to closed

Oops, nevermind, this one is already there. :)

Note: See TracTickets for help on using tickets.