Bug 203434 - Web Inspector: Right-clicking in color picker should not select color
Summary: Web Inspector: Right-clicking in color picker should not select color
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nikita Vasilyev
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-10-25 14:26 PDT by Nikita Vasilyev
Modified: 2019-10-28 16:25 PDT (History)
4 users (show)

See Also:


Attachments
Patch (1.26 KB, patch)
2019-10-25 14:30 PDT, Nikita Vasilyev
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Vasilyev 2019-10-25 14:26:05 PDT
It should show a context menu.

This is NOT a regression. It's been like this for years.
Comment 1 Nikita Vasilyev 2019-10-25 14:30:29 PDT
Created attachment 381967 [details]
Patch
Comment 2 Devin Rousso 2019-10-25 14:36:10 PDT
Comment on attachment 381967 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=381967&action=review

rs=me

> Source/WebInspectorUI/UserInterface/Views/ColorSquare.js:152
> +        if (event.button !== 0 || event.ctrlKey)

Does this work for non-macOS systems too?  Should it only check for `event.ctrlKey` if `WI.Platform.name === "mac"`?
Comment 3 Nikita Vasilyev 2019-10-25 14:50:24 PDT
(In reply to Devin Rousso from comment #2)
> Comment on attachment 381967 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=381967&action=review
> 
> rs=me
> 
> > Source/WebInspectorUI/UserInterface/Views/ColorSquare.js:152
> > +        if (event.button !== 0 || event.ctrlKey)
> 
> Does this work for non-macOS systems too?  Should it only check for
> `event.ctrlKey` if `WI.Platform.name === "mac"`?

Hm, I'm not sure. However, we use `if (event.button !== 0 || event.ctrlKey)` everywhere in Web Inspector (in 13 other places).
Comment 4 Nikita Vasilyev 2019-10-28 15:27:42 PDT
Comment on attachment 381967 [details]
Patch

I'll land this. If we decide to change Control-click behavior on non-Mac platforms, it should be a separate patch that modifies all `event.button !== 0 || event.ctrlKey` conditions, not just in the color picker.
Comment 5 WebKit Commit Bot 2019-10-28 16:24:05 PDT
The commit-queue encountered the following flaky tests while processing attachment 381967 [details]:

webaudio/stereo2mono-down-mixing.html bug 203538 (authors: ap@webkit.org, crogers@google.com, haraken@chromium.org, mark.lam@apple.com, and sam@webkit.org)
The commit-queue is continuing to process your patch.
Comment 6 WebKit Commit Bot 2019-10-28 16:24:54 PDT
Comment on attachment 381967 [details]
Patch

Clearing flags on attachment: 381967

Committed r251682: <https://trac.webkit.org/changeset/251682>
Comment 7 WebKit Commit Bot 2019-10-28 16:24:56 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2019-10-28 16:25:16 PDT
<rdar://problem/56689660>