-
-
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
Unlink toolbar button is enabled when selection is not inside link element #4777
Comments
When selection is placed inside link element for the first time. |
Maybe something related to |
Hard to tell without debugging. This is really odd. |
This is because of missing initial |
We may not need it at all https://github.com/ckeditor/ckeditor5-link/issues/52#issuecomment-294822077 ;-) |
It turned out the issue is in |
I've just noticed that the LinkCommand doesn't base on ToggleAttributeCommand :D So no, this won't be fixed by the fix in the core. |
Not entirely. If you start the editor content with an image (link starts disabled) and then move the selection somewhere into a text, the link is not enabled because it's not refreshed. |
No. LinkCommand doesn't inherit from TAC. Hence, we need the same fix in LC as you proposed in TAC. |
You're right. Shouldn't it rather become a core feature? I mean, there will be tons of commands experiencing the same issue in the future and it's easy to forget about this case. |
I guess we could have a helper ( |
Fix: `LinkCommand` and `UnlinkCommand` should update their state upon editor load. Closes #93.
The text was updated successfully, but these errors were encountered: