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

  1. Open image2 sample.
  2. Select some text which will also include image (e.g. header and first paragraph).
  3. 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 Piotrek Koszuliński

Status: newconfirmed

comment:2 Changed 11 years ago by Piotrek Koszuliński

Priority: NormalHigh

comment:3 Changed 11 years ago by Piotrek Koszuliński

Owner: set to Piotrek Koszuliński
Status: confirmedassigned

comment:4 Changed 11 years ago by Piotrek Koszuliński

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).

comment:5 Changed 11 years ago by Piotrek Koszuliński

Status: assignedreview

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 than getNextSourceNode().
  • Introduced iterator#activeFilter which make it possible to check which ACF instance operative in last block.
  • Introduced CKEDITOR.filter.instances and filter#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.

Last edited 11 years ago by Piotrek Koszuliński (previous) (diff)

comment:6 Changed 11 years ago by Piotrek Koszuliński

I reported an umbrella ticket for the block commands issues mentioned by me in previous comment: #11027.

comment:7 Changed 11 years ago by Frederico Caldeira Knabben

Status: reviewreview_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 Piotrek Koszuliński

Resolution: fixed
Status: review_passedclosed

Fixed on major with git:b6d7b38 on dev and 4d56afd on tests.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy