enjalot / Inlet

Bret Victor inspired slider & color picker plugin for CodeMirror
http://enjalot.github.com/Inlet
Other
74 stars 11 forks source link

If you click on color text (causing the picker box to appear), and drag selection, the picker should probably disappear? #25

Closed increpare closed 9 years ago

georules commented 9 years ago

I prefer to have it remain open until focus is lost. Having it open allows you to click around the color space. I don't usually have one color in mind that I want to drag to instantly.

increpare commented 9 years ago

Ah, no, sorry for the confusion - I mean dragging a text selection, not dragging a color selection:

screen shot 2015-09-25 at 11 57 15
georules commented 9 years ago

I see now, yeah this should probably be handled better. I'll take a look at it.

georules commented 9 years ago

Check out this branch and tell me if you like the way this works.

  1. Items react to mouseup instead of mousedown (so we see what happened from the click instead of at the start of the click)
  2. If the result of the click was a selection, we bail out of the onClick function that would then decide to bring up some kind of picker.

https://github.com/georules/Inlet/tree/test-drag

increpare commented 9 years ago

seems pretty good to me!

enjalot commented 9 years ago

I think this is better. want to make a PR and I'll merge it?