WICG / eyedropper-api

Other
69 stars 7 forks source link

Improve interactive behavior #12

Open yisibl opened 3 years ago

yisibl commented 3 years ago

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

ipopescu93 commented 3 years ago

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).

yisibl commented 3 years ago

@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?

jespertheend commented 3 years ago

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.

Kilian commented 3 years ago

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