eyedropper-api icon indicating copy to clipboard operation
eyedropper-api copied to clipboard

Improve interactive behavior

Open yisibl opened this issue 4 years ago • 4 comments

I plan to migrate the color picker in Chrome Devtools to the EyeDropper API, but there are currently several problems:

  1. There is no independent cursor on the left side of the magnifying glass (the magnifying glass will cover the content at the bottom of the screen, making it difficult to move the cursor)
  2. It is not possible to continuously click to select the color.

image

yisibl avatar Aug 31 '21 08:08 yisibl

I plan to migrate the color picker in Chrome Devtools to the EyeDropper API, but there are currently several problems:

Thanks for the issue and for the work to integrate the API in Chrome Devtools!

  1. There is no independent cursor on the left side of the magnifying glass (the magnifying glass will cover the content at the bottom of the screen, making it difficult to move the cursor)

The user agent has the freedom to implement eyedropper pixel selection UI that bests fits their platform and follows these rules. I am going to follow up on the crbug for the Chromium specific UI.

  1. It is not possible to continuously click to select the color.

image

This is a security mitigation as we don't want a web page to be able to "screen scrape" information the user didn't intend to share while moving the mouse around the screen. We are evaluating allowing the selection of multiple colors by reopening the eyedropper in the same event handler (see #9).

ipopescu93 avatar Sep 01 '21 04:09 ipopescu93

@ipopescu93 Thank you for your reply.

Add a question: currently right clicking will also absorb the color, is it better to be consistent with the behavior of ESC key?

yisibl avatar Sep 01 '21 04:09 yisibl

I also think it could be very valuable to be able to click and hold in order to directly see the result of picking a color before releasing. Is there anything that could be done to make this more secure? Perhaps the same solutions from #13 could apply here as well.

jespertheend avatar Oct 21 '21 19:10 jespertheend

Point number 2 is also captured in https://github.com/WICG/eyedropper-api/issues/6

Kilian avatar Oct 26 '21 10:10 Kilian