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

Unlink option is missing when part of a link selected #4803

Closed
Reinmar opened this issue Jul 20, 2017 · 6 comments · Fixed by ckeditor/ckeditor5-link#142
Closed

Unlink option is missing when part of a link selected #4803

Reinmar opened this issue Jul 20, 2017 · 6 comments · Fixed by ckeditor/ckeditor5-link#142
Assignees
Labels
package:link type:bug This issue reports a buggy (incorrect) behavior.
Milestone

Comments

@Reinmar
Copy link
Member

Reinmar commented Jul 20, 2017

jul-20-2017 12-36-13

@Reinmar
Copy link
Member Author

Reinmar commented Jul 20, 2017

This is serious because you can't type after a link now so the only option to do that was to type and then unlink part of that.

@oleq
Copy link
Member

oleq commented Jul 20, 2017

I'm wondering which part of https://github.com/ckeditor/ckeditor5-link/blob/master/src/unlinkcommand.js#L40-L41 has failed 🤔

@Reinmar
Copy link
Member Author

Reinmar commented Jul 20, 2017

You mean rather https://github.com/ckeditor/ckeditor5-link/blob/master/src/unlinkcommand.js#L23. The command isn't even executed.

@oleq
Copy link
Member

oleq commented Jul 20, 2017

Yes, you're right. It's funny selection.hasAttribute() fails to discover the attribute in such boundary case. Maybe something's wrong with editing<->model synchronization?

@Reinmar
Copy link
Member Author

Reinmar commented Jul 20, 2017

Doesn't look like it still:

image

@oleq oleq self-assigned this Jul 20, 2017
@oleq
Copy link
Member

oleq commented Jul 20, 2017

The presence of the unlink button is controlled by the _getSelectedLinkElement, which works fine for the balloon as a whole (showing up on "click", positioning, etc.) because it checks if the link is fully selected and otherwise returns null.

What we need to do is connect the presence of the unlink button with the state of the unlink command.

oleq referenced this issue in ckeditor/ckeditor5-link Jul 20, 2017
Reinmar referenced this issue in ckeditor/ckeditor5-link Jul 21, 2017
Fix: Then unlink button in the link balloon should be visible when a link is partially selected. Closes #141.
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-link Oct 9, 2019
@mlewand mlewand added this to the iteration 11 milestone Oct 9, 2019
@mlewand mlewand added status:confirmed type:bug This issue reports a buggy (incorrect) behavior. package:link labels Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:link type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
3 participants