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

Minor Glitch: CKEditor "placeholder" clashes with LinkCommand #9776

Closed
mmichaelis opened this issue May 28, 2021 · 4 comments
Closed

Minor Glitch: CKEditor "placeholder" clashes with LinkCommand #9776

mmichaelis opened this issue May 28, 2021 · 4 comments
Labels
type:bug This issue reports a buggy (incorrect) behavior.

Comments

@mmichaelis
Copy link

📝 Provide detailed reproduction steps (if any)

  1. Enable placeholder in your CKEditor configuration. See Editor placeholder - CKEditor 5 Documentation.
  2. Clear the text, so that you see the placeholder.
  3. Press "Link" button in toolbar.

✔️ Expected result

Just as for other inline styles (e.g. Bold), the text area is cleared and the link-popup appears.

❌ Actual result

The placeholder text is not removed, the cursor placed at the end of the placeholder text and the link-popup appears:

ckeditor5-linkcommand-vs-empty-text

Fortunately, if you set a link and submit LinkCommand form view, the placeholder text is gone and the link is written to the text area as expected.

📃 Other details

  • Browser: Chrome 90.0.4430.212
  • OS: Windows 10
  • First affected CKEditor version: 24.0.0
  • Installed CKEditor plugins: Link

If you'd like to see this fixed sooner, add a 👍 reaction to this post.

@mmichaelis mmichaelis added the type:bug This issue reports a buggy (incorrect) behavior. label May 28, 2021
@FilipTokarski
Copy link
Member

Hi, thanks for the report. I tried this on the docs page and also locally but I was unable to reproduce this fully. Placeholder text indeed does not disappear, but the selection is always at the beginning of a paragraph:

0_placeholder1.mp4

Maybe apart from link plugin, you use some custom plugins or some specific plugins combination causes this?

@FilipTokarski FilipTokarski added the pending:feedback This issue is blocked by necessary feedback. label May 28, 2021
@mmichaelis
Copy link
Author

@FilipTokarski, thanks for your response. I can confirm: For the docs page it works as well for me (within Chrome).

I tried to strip down the plugins and ended up with:

  • Essentials
  • Link
  • Paragraph

And the effect is the same, i.e. cursor is at the end of the placeholder text.

Thus, either there is some other side-effect or it is the version (we are at 24.0.0, cannot easily check for up-to-date version).

Another observed difference: If we focus our editor, the placeholder disappears. If I focus the editor in CKEditor documentation, the placeholder text remains until you start typing.

@mmichaelis
Copy link
Author

I assume the new behavior got introduced with #8689. This may already fix the issue, as I think it is ok, that the empty text remains until the link-plugin has added some text, actually. Fix #8689 made it onto master in February 2021, while 24.0.0 is from December 2020.

@FilipTokarski
Copy link
Member

FilipTokarski commented May 31, 2021

Thanks for the details. It's exactly as you described, this new behaviour was introduced in version 26.0.0 and the issue no longer exists, so I guess we can close this ticket.

P.S.
There's a useful tip if you want to quickly check something on different versions of the editor - you can switch versions on our docs page. Fox example instead of url:

https://ckeditor.com/docs/ckeditor5/latest/features/editor-placeholder.html

You can use:

https://ckeditor.com/docs/ckeditor5/24.0.0/features/editor-placeholder.html

@FilipTokarski FilipTokarski removed the pending:feedback This issue is blocked by necessary feedback. label May 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

No branches or pull requests

2 participants