Opened 9 years ago

Last modified 7 years ago

#13332 review Bug

IE: collapsed selection doesn't match styling.

Reported by: Jakub Ś Owned by: Tade0
Priority: Nice to have (we want to work on it) Milestone:
Component: General Version: 4.0
Keywords: IE Cc:

Description (last modified by Jakub Ś)

Problem can be reproduced from CKEditor 4.0 (works fine in 4.0 beta) in IE9-11.

To reproduce for inline styles:

  1. Create a paragraph and enter text, say "This is plain text"
  2. Select whole paragraph and apply Bold
  3. Click once inside paragraph and try to apply any inline style from styles dropdown.

Result: In IE, the inline style gets applied to whole paragraph even when text was not selected after clicking once.


To reproduce for block styles:

  1. Create 3 paragraphs of text
  2. Select them all with a mouse and apply "Italic Title" from styles dropdown.
  3. Click at the end of second element (behind it actually)
  4. Apply "Special Container" style

Result: all paragraphs get styled while only should be changed.

NOTE: This issue has been reported on our support channel. User claims that the range.collapsed property returns false in IE whereas in e.g Chrome it returns true.

Attachments (2)

2015-05-28_1525.swf (676.2 KB) - added by Jakub Ś 9 years ago.
2015-11-19_1643.swf (591.5 KB) - added by Jakub Ś 8 years ago.

Download all attachments as: .zip

Change History (16)

comment:1 Changed 9 years ago by Jakub Ś

Status: newconfirmed

Changed 9 years ago by Jakub Ś

Attachment: 2015-05-28_1525.swf added

comment:2 Changed 8 years ago by Jakub Ś

Description: modified (diff)
Summary: IE: collapsed selection and inline style exchange wrapping inline element.IE: collapsed selection doesn't match styling.

Changed 8 years ago by Jakub Ś

Attachment: 2015-11-19_1643.swf added

comment:3 Changed 8 years ago by Marek Lewandowski

Milestone: CKEditor 4.5.6

comment:4 Changed 8 years ago by Tade0

Owner: set to Tade0
Status: confirmedassigned

comment:5 Changed 8 years ago by Tade0

The problem here lies is the fact, that the selection is locked when the style is applied, but unlocked only when the editor regains focus, which means it has to be lost earlier for the unlock to work. This is not the case here, hence the bug.

This bug doesn't occur in Chrome/Firefox, because there's no locking/unlocking happening in these browsers.

Edit: When a combo box is selected the focus is lost in IE, but not in any other browser.

Last edited 8 years ago by Tade0 (previous) (diff)

comment:6 Changed 8 years ago by Tade0

Status: assignedreview

One solution that I found and implemented was to update the lastSel variable - the last selection saved before blurring - on mousedown.

Changes pushed to branch:t/13332.

comment:7 Changed 8 years ago by Marek Lewandowski

Milestone: CKEditor 4.5.6CKEditor 4.5.7

comment:8 Changed 8 years ago by Marek Lewandowski

Milestone: CKEditor 4.5.7CKEditor 4.5.8

comment:9 Changed 8 years ago by Marek Lewandowski

Milestone: CKEditor 4.5.8CKEditor 4.5.9

comment:10 Changed 8 years ago by Marek Lewandowski

Milestone: CKEditor 4.5.9CKEditor 4.5.10

comment:11 Changed 8 years ago by Marek Lewandowski

Milestone: CKEditor 4.5.10CKEditor 4.5.11

Moving tickets to the next milestone.

comment:12 Changed 8 years ago by Marek Lewandowski

Milestone: CKEditor 4.5.11CKEditor 4.6.1

comment:13 Changed 7 years ago by Marek Lewandowski

Milestone: CKEditor 4.6.1CKEditor 4.6.2

Moving to 4.6.2 minor release, as 4.6.1 is mostly about polishing 4.6.0.

comment:14 Changed 7 years ago by Marek Lewandowski

Milestone: CKEditor 4.6.2
Priority: NormalNice to have (we want to work on it)
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