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

Prevent adding inline filler to elements with contenteditable=false #1170

Closed
szymonkups opened this Issue Oct 19, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@szymonkups
Contributor

szymonkups commented Oct 19, 2017

There are situations when browsers put selection inside contenteditable=false elements (ckeditor/ckeditor5-image#19) and we render inline filler there. Block fillers are blocked by getFillerOffset() but inline fillers are not blocked in any way there.

The solution might be to block rendering it if the nearest ancestor with contenteditable attribute has it set to false.

@szymonkups szymonkups added this to the iteration 13 milestone Oct 19, 2017

@szymonkups szymonkups self-assigned this Oct 19, 2017

@pjasiun

This comment has been minimized.

Member

pjasiun commented Oct 19, 2017

This is strange because inline filler should be rendered only where the selection is. First of all, the collapsed selection should not be placed in not editable elements. Maybe we should fix the selection position to move it out of the not editable elements first?

@szymonkups

This comment has been minimized.

Contributor

szymonkups commented Oct 19, 2017

That was the first approach but here ckeditor/ckeditor5-image#19 (comment) I described why this fails.

pjasiun added a commit that referenced this issue Oct 30, 2017

Merge pull request #1173 from ckeditor/t/1170
Fix: Prevent adding inline filler to non-editable content. Closes #1170.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment