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

Selection converter should mark the top-most widget only #4594

Closed
Reinmar opened this issue Nov 6, 2018 · 2 comments · Fixed by ckeditor/ckeditor5-widget#58
Closed

Selection converter should mark the top-most widget only #4594

Reinmar opened this issue Nov 6, 2018 · 2 comments · Fixed by ckeditor/ckeditor5-widget#58
Assignees
Labels
package:widget type:bug This issue reports a buggy (incorrect) behavior.
Milestone

Comments

@Reinmar
Copy link
Member

Reinmar commented Nov 6, 2018

image

Right now the selection converter (https://github.com/ckeditor/ckeditor5-widget/blob/49afa6e3216334b18573ae0be42d6abb2af324cb/src/widget.js#L67-L81) marks all widget elements in the selection, not just the top-most one.

@Reinmar
Copy link
Member Author

Reinmar commented Nov 6, 2018

OK, I pushed some quick hack for it in https://github.com/ckeditor/ckeditor5-widget/compare/t/57

The code became ugly there and needs refactoring (and tests of course), but the change seems to fix the issue.

nov-06-2018 21-18-48

@Reinmar
Copy link
Member Author

Reinmar commented Nov 6, 2018

I also pushed a playground for it to https://github.com/ckeditor/ckeditor5-core/compare/t/ckeditor5-widget/57. It should be turned into a manual test for this issue.

Reinmar referenced this issue in ckeditor/ckeditor5-widget Nov 19, 2018
Fix: Selection converter will mark only the topmost widget in case of selecting a widget with another widget nested inside it. Closes #57.
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-widget Oct 9, 2019
@mlewand mlewand added this to the iteration 21 milestone Oct 9, 2019
@mlewand mlewand added status:confirmed type:bug This issue reports a buggy (incorrect) behavior. package:widget labels Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:widget type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants