-
Notifications
You must be signed in to change notification settings - Fork 29
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
Selection mark disappear #64
Comments
Not sure how to solve this. When user focus the input field, the selection is applied to the input. Therefore the text is not displayed as selected anymore unless the user enter a valid color in which case I redo the selection and modify the color. This does not happen in your example because the text entered is not a valid color. So yeah, not sure exactly how to solve it. If you have an idea, go for the PR 🚀 |
This is how you solve it. Notice you can highlight text, click the input area causing focus to be lost, while keeping text highlighted. https://jsfiddle.net/cp6L291g/135/ I am not good enough to implement such a solution myself, but in case you actually want to solve that the solution is at provided link. :) |
Thanks a lot. Unfortunately jsfiddle was blocked in my country. I fixed it through Selection and Range, with a lot break changes. |
Unfortunately this isn't a valid solution for Stylo. This gist copy the selection and modify the DOM when the user is typing within the input field to give the feeling the text is still selected. |
before i customs text color
when i click the input element, selection mark disappear, but the color can still change normally.
actually, click the toolbar will take same effect.
The text was updated successfully, but these errors were encountered: