Closed momijizukamori closed 1 year ago
I'm not sure what this is supposed to solve! Can you explain the issue you have?
I guess I didn't look closely. It looks to me like you want to mirror the selection from the original input field in the color picke's input field.
I will look into it.
Yeah, basically by default, if you click into the original field and highlight, when you release the mouse button, you end up in the picker's input field with your highlight suddenly gone, which would be frustrating if you were trying to copy or paste a color from the field.
That is indeed a sensible addition. Will implement soon. Thank you for suggesting it.
Mostly because it feels like more intuitive behavior for end users? It's a quick change - after this line: https://github.com/mdbassit/Coloris/blob/main/src/coloris.js#L318 add
colorValue.setSelectionRange(currentEl.selectionStart, currentEl.selectionEnd, currentEl.selectionDirection);
. if the picker is configured withselectInput: true
that still properly supersedes this and selects the entire input field.