Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: mirror cursor position/selection when picker is opened with focusInput: true #105

Closed
momijizukamori opened this issue Jun 17, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@momijizukamori
Copy link

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 with selectInput: true that still properly supersedes this and selects the entire input field.

@mdbassit
Copy link
Owner

I'm not sure what this is supposed to solve! Can you explain the issue you have?

@mdbassit
Copy link
Owner

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.

@mdbassit mdbassit added the enhancement New feature or request label Jun 19, 2023
@momijizukamori
Copy link
Author

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.

@mdbassit
Copy link
Owner

That is indeed a sensible addition. Will implement soon. Thank you for suggesting it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants