Opened 16 years ago
Closed 16 years ago
#3309 closed Bug (fixed)
Styles are remove when caret placed in element boundaries
Reported by: | Frederico Caldeira Knabben | Owned by: | Garry Yao |
---|---|---|---|
Priority: | Must have (possibly next milestone) | Milestone: | CKEditor 3.0 |
Component: | Core : Styles | Version: | |
Keywords: | IBM Confirmed Review+ | Cc: | damian.chojna@… |
Description
- Having the following selection:
Some <strong>sample^</strong> text. OR Some <strong>^sample</strong> text.
- Press CTRL+B.
The entire work gets un-bolded, instead of simply disabling it (moving the selection to outside the touching boundary).
This issue is more often faced when typing, using CTRL+B to type a word, and then CTRL+B again to continue writing.
Attachments (3)
Change History (15)
comment:1 Changed 16 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
comment:2 Changed 16 years ago by
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
This issue is "similar" but not really the same as the one described into #2976. We should be able to have a simple fix for it from V2.
comment:3 Changed 16 years ago by
Owner: | set to Garry Yao |
---|---|
Status: | reopened → new |
Changed 16 years ago by
Attachment: | 3309.patch added |
---|
comment:4 Changed 16 years ago by
Keywords: | Review? added |
---|---|
Status: | new → assigned |
comment:5 Changed 16 years ago by
Keywords: | Review- added; Review? removed |
---|
The following case has strange effects for me:
- With the following code and selection:
<p><em>Some <b>^Text</b></em></p>
- Hitting CTRL+I for the italics.
Current results:
<p>Some <em>Some <b>Text^</b></em></p>
Changed 16 years ago by
Attachment: | 3309_2.patch added |
---|
comment:6 Changed 16 years ago by
Keywords: | Review? added; Review- removed |
---|
The culprit here is range::checkBoundaryOfElement should be element sensitive when determinating if it's on element boundaries, which means it should take the target element as an another param.
range.checkBoundaryOfElement( element, CKEDITOR.START_OF_ELEMENT );
With this logic errors hunted down, now the following codes:
range.checkBoundaryOfElement( doc.getById('target'), CKEDITOR.START_OF_ELEMENT );
It should also return true with the following TCs:
<b id="target">^Element</b> <em id="target"><b>^Element</b></em> <em id="target"><b>^Element</b></em> <em id="target">^<b>Element</b></em> <em id="target"><b><span _fck_bookmark="1"> </span>^Element</b></em>
comment:7 Changed 16 years ago by
Cc: | damian.chojna@… added |
---|---|
Keywords: | IBM added |
comment:8 Changed 16 years ago by
Priority: | Normal → High |
---|
comment:9 Changed 16 years ago by
Keywords: | Review- added; Review? removed |
---|
I've discussed some changes with Garry on this fix to make it a bit simpler. A new patch should be coming soon.
Changed 16 years ago by
Attachment: | 3309_3.patch added |
---|
comment:10 Changed 16 years ago by
Keywords: | Review? added; Review- removed |
---|
comment:11 Changed 16 years ago by
Keywords: | Review+ added; Review? removed |
---|
comment:12 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
DUP of #2976.