Opened 11 years ago
Closed 11 years ago
#10822 closed Bug (fixed)
Basicstyles (and other features) should not be applicable to widgets (including nested editables)
Reported by: | Piotrek Koszuliński | Owned by: | Piotrek Koszuliński |
---|---|---|---|
Priority: | Must have (possibly next milestone) | Milestone: | CKEditor 4.3 |
Component: | General | Version: | |
Keywords: | Cc: |
Description
- Open image2 sample.
- Select some text which will also include image (e.g. header and first paragraph).
- Apply bold style.
- Expected: bold was applied only to selected text not including widgets and their nested editables.
- Actual: bold was applied everywhere - even inside non-editable widgets structures and in nested editables.
Why shouldn't styles be applied to nested editables from outside of widgets? Because nested editables may have different ACF settings, so this style may be disabled in there.
Note: this ticket not only concerns basicstyles, but all features like links, alignment, lists, etc (the last two ones actually seem to work correctly).
Change History (8)
comment:1 Changed 11 years ago by
Status: | new → confirmed |
---|
comment:2 Changed 11 years ago by
Priority: | Normal → High |
---|
comment:3 Changed 11 years ago by
Owner: | set to Piotrek Koszuliński |
---|---|
Status: | confirmed → assigned |
comment:4 Changed 11 years ago by
comment:5 Changed 11 years ago by
Status: | assigned → review |
---|
Fixed:
- Neither inline nor block styles are applied to the non-editable parts of content.
- Iterator does not return non-editable blocks.
- Exception: iterator returns blocks with contenteditable="false".
- Iterator enters nested editables and returns block found inside them.
- Iterator does not leak out from range.root any more.
- Iterator checks data-cke-filter of nested editables to decide whether it can enter them.
- Iterator does not enter blockless editables.
- Range#enlarge does not stop on positioned inline elements.
- Range#enlarge does not stop on blocks inside non-editable inline elements.
- Range#shrink does not cross editable border.
- Range isn't incorrectly shrinked after applying inline style on non-editable content. Style applied on fake sel will result in fake sel.
- Styles are not applied in nested editables which filters do not allow for them.
- Duplicates of elements created by style application are not removed from inside non-editable elements.
- Style#checkApplicable returns false if block style is not applicable in block limit.
New stuff:
- Introduced
element#forEach()
for easy DFS traversal - it should be faster thangetNextSourceNode()
. - Introduced
iterator#activeFilter
which make it possible to check which ACF instance operative in last block. - Introduced
CKEDITOR.filter.instances
andfilter#id
.
Known (unrelated) issues:
- List commands sometimes clone contents, so references are lost and widgets are destroyed.
- Block with only non-editable content are not turned into list items.
- Blocks with only non-editable content are not idented.
- Indent on fake selection (e.g. mathjax) throws an error.
- List command on fake selection throw an error.
- Blockquote does not work with non-editable elements.
- Indent stops on first non-editable element.
- Perhaps more...
All those issues need tickets.
comment:6 Changed 11 years ago by
I reported an umbrella ticket for the block commands issues mentioned by me in previous comment: #11027.
comment:7 Changed 11 years ago by
Status: | review → review_passed |
---|
I've committed small changes to the documentation of elements.forEach().
This branch is backed up by a strong set of tests, so I have no clear reason to reject it. Well done.
comment:8 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Fixed on major with git:b6d7b38 on dev and 4d56afd on tests.
TODO: Select widget and apply block style to it (e.g. one of formats). Widgets instance is completely gone (most likely to some elements cloning).