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

Color picker hex value not applied to selected text #390

Open
bajenaruandrei opened this issue Jan 4, 2024 · 6 comments
Open

Color picker hex value not applied to selected text #390

bajenaruandrei opened this issue Jan 4, 2024 · 6 comments

Comments

@bajenaruandrei
Copy link

Current behaviour
When selecting a chunk of text to apply a color on it, the HEX color input is not focused thus forcing me to click on the input which results in losing the selected text. The color is applied to the cursor and from there I can type using my color, but the cursor is also moved to the beginning of the input field, blocking me in adding a custom color wherever I need it.

Expected behaviour
Input is focused and text selection is kept when applying a custom HEX value. The issue is not happening for already existent colors in the color palette.

Version: 4.1.3

From time to time, when the color picker is opened I receive the following error:
Uncaught DOMException: Failed to execute 'querySelector' on 'Document': 'label[for="fr-color-hex-layer- 1"]' is not a valid selector.

Has someone else encountered such issues and has possible solutions? I tried to implement something custom on our end, but it's breaking the regular color selection.

@bajenaruandrei
Copy link
Author

Has anyone encountered something similar or has any idea on how to fix it? Thank you!

@drilonhalili
Copy link

@andreibaje I just figured out that adding 'iframe: true' makes it work.

@bajenaruandrei
Copy link
Author

Hei @drilonhalili ! Thank you for your answer, but I have a follow-up question: To what exactly should I add the iframe: true ? Thank you!

@bajenaruandrei
Copy link
Author

Hey @drilonhalili ! Thanks, I'll have a look at that.

@drilonhalili
Copy link

@andreibaje this is fixed on V4.1.4 froala/wysiwyg-editor#4663 (comment)

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

No branches or pull requests

2 participants