Opened 15 years ago

Closed 15 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

  1. Open the replace by code example page;
  2. Initial the document with the following content and selection:
    ^<ol><li>item</li></ol>^
    
  3. Click on stylesCombo to open drop-down.
  • Actual Result: No options are listed in the drop-down.

Attachments (3)

3092.patch (914 bytes) - added by Garry Yao 15 years ago.
3092_2.patch (1.4 KB) - added by Garry Yao 15 years ago.
3092_3.patch (1.5 KB) - added by Garry Yao 15 years ago.

Download all attachments as: .zip

Change History (17)

comment:1 Changed 15 years ago by Garry Yao

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

<table>
	<tbody>
		<tr>
			<td>
				text</td>
		</tr>
	</tbody>
</table>

comment:2 Changed 15 years ago by Frederico Caldeira Knabben

Keywords: WorksForMe added

I can't reproduce this. Can you confirm it?

comment:3 Changed 15 years ago by Garry Yao

Keywords: Confirmed added; WorksForMe removed
Owner: set to Garry Yao
Status: newassigned

It's a FF only issue.

Changed 15 years ago by Garry Yao

Attachment: 3092.patch added

comment:4 Changed 15 years ago by Garry Yao

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 15 years ago by Garry Yao

Keywords: Firefox added

comment:6 Changed 15 years ago by Garry Yao

Keywords: Review? removed

comment:7 Changed 15 years ago by Garry Yao

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 15 years ago by Frederico Caldeira Knabben

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 15 years ago by Garry Yao

Attachment: 3092_2.patch added

comment:9 Changed 15 years ago by Garry Yao

Keywords: Review? added; Review- removed

comment:10 Changed 15 years ago by Frederico Caldeira Knabben

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 15 years ago by Garry Yao

Attachment: 3092_3.patch added

comment:11 Changed 15 years ago by Garry Yao

Component: GeneralCore : Styles
Keywords: Review? added; Review- removed
Version: SVN (FCKeditor)

comment:12 Changed 15 years ago by Martin Kou

Keywords: IBM added

comment:13 Changed 15 years ago by Frederico Caldeira Knabben

Keywords: Review+ added; Review? removed

comment:14 Changed 15 years ago by Garry Yao

Resolution: fixed
Status: assignedclosed

Fixed with [3494].

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