Opened 13 years ago
Closed 13 years ago
#9662 closed Bug (fixed)
Unable to re-assign style to an image
| Reported by: | Olek Nowodziński | Owned by: | Piotrek Koszuliński |
|---|---|---|---|
| Priority: | Normal | Milestone: | CKEditor 4.0 |
| Component: | Core : Styles | Version: | 4.0 |
| Keywords: | Cc: |
Description (last modified by )
- Open http://ckeditor4.t/ckeditor/samples/replacebycode.html
- Insert an image with src assets/sample.jpg
- Assign style "Styled image (right)"
- Assign style "Styled image (left)"
- Nothing happened. Image holds "Styled image (right)".
- Double click the image to show properties. No property has been parsed (no url, alt, width, height...).
Related to #9651. Tested with latest Chrome.
Change History (7)
comment:1 Changed 13 years ago by
| Description: | modified (diff) |
|---|
comment:2 Changed 13 years ago by
| Component: | Core : Tables → Core : Styles |
|---|
comment:3 Changed 13 years ago by
comment:4 Changed 13 years ago by
| Owner: | set to Piotrek Koszuliński |
|---|---|
| Status: | new → assigned |
comment:5 Changed 13 years ago by
| Status: | assigned → review |
|---|
Various things were broken:
- Evaluator has been set on range, not walker.
- Wrong arguments were passed to isBookmark factory so evaluator was checking if node is a bookmark.
- Also, I got rid of duck typing in isBookmark evaluator.
comment:6 Changed 13 years ago by
CKEDITOR.dom.walker.bookmarkwith weird arguments order was introduced in git:c40b595a (2009 year).- The broken part of
CKEDITOR.dom.range#getEnclosedNodehasn't been touched since git:29a69527 (2009 year too). Last change was made in 2010 (git:1ecf10c4).
List of bookmark evaluator with arguments:
core/dom/range.js: bookmarkEvaluator = CKEDITOR.dom.walker.bookmark( true ), core/dom/range.js: bookmark = CKEDITOR.dom.walker.bookmark( 1 ); core/dom/range.js: bookmark = CKEDITOR.dom.walker.bookmark( false ); core/dom/range.js: isNotBookmarks = CKEDITOR.dom.walker.bookmark( true ), core/dom/iterator.js: bookmarkGuard = CKEDITOR.dom.walker.bookmark( false, true ), core/dom/iterator.js: ignoreBookmarkTextEvaluator = CKEDITOR.dom.walker.bookmark( true, true ); core/editable.js: isNotBookmark = CKEDITOR.dom.walker.bookmark( false, true ); core/style.js: var notBookmark = CKEDITOR.dom.walker.bookmark( 0, 1 ), plugins/indent/plugin.js: isNotBookmark = CKEDITOR.dom.walker.bookmark( false, true );
Only third looks like broken (because there's only one, falsy argument) and this is the one from getEnclosedNode.
comment:7 Changed 13 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | review → closed |
Masterised git:502aba7.

It doesn't happen always. Frequency depends on the place where image is inserted - at the beginning of block it's very often, when at the end I wasn't able to reproduce it.