-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
#8689: The editor placeholder should not disappear until started typing #8867
Conversation
…uacnlee/ckeditor5 into huacnlee-feat/better-placeholder-behavior
…appear when focused.
…fy its look and UX.
@oleq, I had trouble understanding at first how the Tell me please, if I got this wrong, but we are assuming that the post-fixer was fired on change, therefore we can assume the focus is there, in the element, so the only thing left is to check the configuration option to decide whether we want to hide placeholder. If that's correct, then maybe we could change the name of |
Also, do you see a preferred way of testing this change? https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-image/src/imagecaption/utils.js#L30 |
I agree this is a bad name of the argument. I'd say |
Somewhere in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that we also need some tests for the new option (inside the placeholder tests). Currently, I can see only new tests for needsPlaceholder
.
Also, this PR is introducing a breaking change on enablePlaceholder
and needsPlaceholder
functions.
I wonder whether I should:
|
|
In Neos 7.3.17 and before the placeholder in ckeditor would not disappear when focused. And only when typing. By switching to the native placeholder feature of ckeditor in #3558 we introduced a regression as that implementation would hide the placeholder while just clicking into. This is especially noticeable for centered texts as the cursor needs one millisecond to adjust and its glitchy. This will eventually be fixed in Ckeditor 24 something. As a hotfix for our version 16 i introduce the patch of ckeditor/ckeditor5#8474 (without the css absolute change as that would make centered text uneditable). The mentioned fix was not merged directly into ckeditor but made way more complicated: ckeditor/ckeditor5#8867 We dont need the more complicated fix as we dont use the mentioned features of the placeholder in a image description and such.
…3864) * BUGFIX: Restore old Placeholder behavior to keep shown when focused In Neos 7.3.17 and before the placeholder in ckeditor would not disappear when focused. And only when typing. By switching to the native placeholder feature of ckeditor in #3558 we introduced a regression as that implementation would hide the placeholder while just clicking into. This is especially noticeable for centered texts as the cursor needs one millisecond to adjust and its glitchy. This will eventually be fixed in Ckeditor 24 something. As a hotfix for our version 16 i introduce the patch of ckeditor/ckeditor5#8474 (without the css absolute change as that would make centered text uneditable). The mentioned fix was not merged directly into ckeditor but made way more complicated: ckeditor/ckeditor5#8867 We dont need the more complicated fix as we dont use the mentioned features of the placeholder in a image description and such. * TASK: Move cursor before the placeholer * TASK: Hide break in placeholder context To move the cursor to the first position, the placeholder text is moved backwards. Therefore, a change with a break is disadvantageous. --------- Co-authored-by: Markus Günther <info@unikka.de>
…eos#3864) * BUGFIX: Restore old Placeholder behavior to keep shown when focused In Neos 7.3.17 and before the placeholder in ckeditor would not disappear when focused. And only when typing. By switching to the native placeholder feature of ckeditor in neos#3558 we introduced a regression as that implementation would hide the placeholder while just clicking into. This is especially noticeable for centered texts as the cursor needs one millisecond to adjust and its glitchy. This will eventually be fixed in Ckeditor 24 something. As a hotfix for our version 16 i introduce the patch of ckeditor/ckeditor5#8474 (without the css absolute change as that would make centered text uneditable). The mentioned fix was not merged directly into ckeditor but made way more complicated: ckeditor/ckeditor5#8867 We dont need the more complicated fix as we dont use the mentioned features of the placeholder in a image description and such. * TASK: Move cursor before the placeholer * TASK: Hide break in placeholder context To move the cursor to the first position, the placeholder text is moved backwards. Therefore, a change with a break is disadvantageous. --------- Co-authored-by: Markus Günther <info@unikka.de>
Suggested merge commit message (convention)
Fix (engine): The editor placeholder should not disappear until started typing. Closes #8689.
Fix (image): Image caption placeholder is now hidden when focused. See #8689.
Fix (heading): In Title plugin, the body placeholder is visible even when the body section is focused. See #8689.
Fix: Editor will show the placeholder even when focused. See #8689.
TODO: Check if The editor placeholder should disappear when typing, not when focusing the editor #8689 is also fixed in this
TODO: Make sure this works with RTL.
Additional information
This is a draft as I pointed out in the original PR. It needs proper tests and documentation.