Color picker hex value not applied to selected text
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.
Has anyone encountered something similar or has any idea on how to fix it? Thank you!
@andreibaje I just figured out that adding 'iframe: true' makes it work.
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!
Hey @andreibaje, it is in documentation site Froala Options: https://froala.com/wysiwyg-editor/docs/options/?tp_nonce=78b4a42bd4&_wp_http_referer=%2Fwysiwyg-editor%2Fdocs%2Foptions%2F%3F_gl%3D11xa20ha_gaMTY5MTE4MTIuMTcwNTA5NDY2NA.._ga_MKY1GLPRHT*MTcwNTA5NDY2NC4xLjAuMTcwNTA5NDY2NC42MC4wLjA.&s=iframe&post_type=page#iframe:~:text=%27font_awesome_5%27%0A%0A%7D)%3B-,iframe,-Type%3A
Hey @drilonhalili ! Thanks, I'll have a look at that.
@andreibaje this is fixed on V4.1.4 https://github.com/froala/wysiwyg-editor/issues/4663#issuecomment-1780082294