Bug 193386 - Right-clicking on a hyperlink sometimes causes the link to be followed
Summary: Right-clicking on a hyperlink sometimes causes the link to be followed
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: Safari 12
Hardware: Mac macOS 10.14
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-01-13 05:48 PST by Albert Albala
Modified: 2019-01-17 10:26 PST (History)
7 users (show)

See Also:


Attachments
Where this bug appears on amazon (769.88 KB, image/png)
2019-01-16 08:10 PST, Albert Albala
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Albert Albala 2019-01-13 05:48:24 PST
I am seeing this on a lot of web pages, but not all.

This can happen if I right click on a hyperlink to, for example, inspect it, or open it in a new tab. This causes the link to be followed as if I had clicked on it.

Because this does not happen every time, here is one time I have managed to reproduce it:

* On github, upload an image in an issue comment
* Save the comment
* Right-click on the image to inspect it
* Safari will follow the link for the image and display, which is not what we want.
Comment 1 Albert Albala 2019-01-13 05:50:52 PST
I have made a screen-capture video which demonstrates this problem at https://youtu.be/dEgAdwaGiZQ

I am using Safari Version 12.0.1 (14606.2.104.1.1) on Mac OS 10.14.1
Comment 2 Alexey Proskuryakov 2019-01-15 16:55:52 PST
Thank you for the report!

Does one need to upload the image to reproduce, or does using an existing image work? Could you share an existing URL if the latter is sufficient?

I haven't seen this at all, so my instinct is to suspect an event handling race on the website, or in some extension that you might have. Does this happen on many sites, and does it happen in a clean user account?
Comment 3 Albert Albala 2019-01-16 08:10:43 PST
Created attachment 359267 [details]
Where this bug appears on amazon
Comment 4 Albert Albala 2019-01-16 08:13:08 PST
Hi Alexey, thanks.

This bug does not happen for me systematically.

I have attached of screenshot of where this appears on Amazon.com for me today.

I can systematically reproduce this, for now at least, by

* going to amazon.com
* right-clicking on that link
* selecting "inspect element"
* the inspection tab shows up, but the link is also followed.

This happens to me in a "Private window" as well. I will try in the Mac OS guest user account as well.
Comment 5 Albert Albala 2019-01-16 09:10:01 PST
To follow up, when I log in as "Guest User", this does not happen.

Also, in the Preferences > Extensions tab, I have no extensions.

Any guidance on how to debug this would be most appreciated!
Comment 6 Alexey Proskuryakov 2019-01-16 09:48:27 PST
Thank you for the additional details! I can't reproduce or think about what kind of difference could be causing this, but CC'ing folks who may have know more about this area.

One more question though: what exact device are you using to control the mouse? Do you have a different device to try? I tried to reproduce with a built in MacBook Pro trackpad and with an Apple Mighty Mouse.
Comment 7 Radar WebKit Bug Importer 2019-01-16 09:48:51 PST
<rdar://problem/47319364>
Comment 8 Albert Albala 2019-01-16 10:05:59 PST
> what exact device are you using to control the mouse

I am using a built-in Mac Book Pro trackpad
Comment 9 Tim Horton 2019-01-16 10:06:37 PST
Probably https://trac.webkit.org/changeset/239686/webkit?
Comment 10 Tim Horton 2019-01-16 10:07:50 PST
But I don’t know when that regressed
Comment 11 Alexey Proskuryakov 2019-01-16 14:56:12 PST
Good catch. That sounds identical, but it was also stated that the patch was fixing a regression.

Brian, is this a duplicate of the issue that you fixed?
Comment 12 BJ Burg 2019-01-16 15:25:38 PST
(In reply to Alexey Proskuryakov from comment #11)
> Good catch. That sounds identical, but it was also stated that the patch was
> fixing a regression.
> 
> Brian, is this a duplicate of the issue that you fixed?

It sure sounds like it. Please verify in latest Safari Technology Preview.
Comment 13 Albert Albala 2019-01-17 10:09:56 PST
Here is a screen capture of this bug appearing on a version of Safari Technology Preview I downloaded today.

See https://www.youtube.com/watch?v=kkcT4CKB9rY&feature=youtu.be

Release 73 (Safari 12.1, WebKit 14607.1.18.3)
Comment 14 Alexey Proskuryakov 2019-01-17 10:26:06 PST
It is expected that the current STP doesn't have the fix yet. Per release notes, it is based on r239566 (https://webkit.org/blog/8555/release-notes-for-safari-technology-preview-73/), and the fix was made in r239686.

But it's good that it reproduced for you in STP, that way we can be confident in whether it's fixed once you test STP 74.