Opened 17 years ago
Closed 16 years ago
#3092 closed Bug (fixed)
plugin:stylesCombo has no options
| Reported by: | Garry Yao | Owned by: | Garry Yao |
|---|---|---|---|
| Priority: | Normal | Milestone: | CKEditor 3.0 |
| Component: | Core : Styles | Version: | |
| Keywords: | Firefox Confirmed IBM Review+ | Cc: |
Description
Procedures
- Open the replace by code example page;
- Initial the document with the following content and selection:
^<ol><li>item</li></ol>^
- Click on stylesCombo to open drop-down.
- Actual Result: No options are listed in the drop-down.
Attachments (3)
Change History (17)
comment:1 Changed 17 years ago by
comment:2 Changed 17 years ago by
| Keywords: | WorksForMe added |
|---|
I can't reproduce this. Can you confirm it?
comment:3 Changed 17 years ago by
| Keywords: | Confirmed added; WorksForMe removed |
|---|---|
| Owner: | set to Garry Yao |
| Status: | new → assigned |
It's a FF only issue.
Changed 17 years ago by
| Attachment: | 3092.patch added |
|---|
comment:4 Changed 17 years ago by
| Keywords: | Review? added |
|---|
It's necessary to check on element path for BOTH inline and block style, the patch remove the condition which skip the elementpath checking.
comment:5 Changed 17 years ago by
| Keywords: | Firefox added |
|---|
comment:6 Changed 17 years ago by
| Keywords: | Review? removed |
|---|
comment:7 Changed 17 years ago by
| Keywords: | Review? added |
|---|
After some discussion with Fred,it's confirmed that it should be able for the user to fully select on block element (mostly by click on elementpath bar for that) and apply the dedicating styles, including specific styles which were apply to the block itself, and more generic styles which were applied to it's content.
Currently we have some special cases in IE where certain elements is unselectable ( e.g. 'tr' and 'tbody'), caused by CKEDITOR.dom.selection::selectElement invoking will have no effect with these elements.
While we're seaking for workaround for the above bug, this patch here fix the other problem on the other side inside the styleCombo, which prevent styles options been shown if selecting a block element.
comment:8 Changed 16 years ago by
| Keywords: | Review- added; Review? removed |
|---|
The idea is ok. There are two small optimizations that could be done in the code, which are result of the change:
- As we may have the "element" variable, the elementPath creation should consider it. So we could have the following at line 161:
elementPath = new CKEDITOR.dom.elementPath( element || selection.getStartElement() );
- As we now always have the elementPath variable created, the if check at line 185 and its relative else block are not anymore needed.
Changed 16 years ago by
| Attachment: | 3092_2.patch added |
|---|
comment:9 Changed 16 years ago by
| Keywords: | Review? added; Review- removed |
|---|
comment:10 Changed 16 years ago by
| Keywords: | Review- added; Review? removed |
|---|
The patch is almost good. There is just a minor issue, as elementPath is now being declared twice in the var statement.
Changed 16 years ago by
| Attachment: | 3092_3.patch added |
|---|
comment:11 Changed 16 years ago by
| Component: | General → Core : Styles |
|---|---|
| Keywords: | Review? added; Review- removed |
| Version: | SVN (FCKeditor) |
comment:12 Changed 16 years ago by
| Keywords: | IBM added |
|---|
comment:13 Changed 16 years ago by
| Keywords: | Review+ added; Review? removed |
|---|

The same case happened when there's only a table inside content: