#6663 closed Bug (fixed)
Issue with adding carriage returns to Table caption.
Reported by: | Satya Minnekanti | Owned by: | Garry Yao |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.6.1 |
Component: | UI : Dialogs | Version: | 3.0 |
Keywords: | IBM | Cc: | Damian, joek, james, c |
Description
To reproduce the defect:
- Open Ajax sample.
- Insert a Table with a caption(Frederico Knabben).
- Keep cursor before the word Frederico in the Table caption & press Enter 2 to 3 times
- See that the Table is moved down & when you keep the cursor in the Table see that Table orientation is shown in the empty space above & not around the table.
- when we check the Table dialog Carriage returns are not shown in the caption field.
- Now keep the cursor in the Empty space above the Table and click on Table icon in the Toolbar.
- Enter values for Rows and Columns and press OK Button.
Expected Result:
Table is inserted with the entered no of rows & columns.
Actual Result:
Nothing happens and in firebug it is showing the following error.
k.$ is undefined [Break on this error] };d.nodeList.prototype={count:function...Parent().$):j!=i.$&&j.contains(i.$);
Table Caption should not allow Carriage Returns.
Attachments (2)
Change History (15)
comment:1 Changed 14 years ago by
Status: | new → confirmed |
---|---|
Version: | 3.4.2 → 3.0 |
comment:2 Changed 14 years ago by
Table captions should support inline content only http://www.w3.org/TR/html401/struct/tables.html#h-11.2.2. If multi-line captions are to be supported they should probably be provided with <br>.
Which milestone can this be targeted for?
Changed 14 years ago by
Attachment: | 6663.patch added |
---|
comment:3 Changed 14 years ago by
Cc: | james c added; James removed |
---|---|
Component: | General → UI : Dialogs |
Owner: | set to Garry Yao |
Status: | confirmed → review |
It's hard to propose the right UI to manage inline-contents-filled caption in dialog, while it's always easy to make the editing happen in wysiwyg, so propose for a disabled field in such situation.
comment:4 follow-up: 5 Changed 14 years ago by
Status: | review → review_failed |
---|
:/ not really a nice thing to have... it looks like the right fix is a bit more complex.
- Firstly, we must avoid <p> being created on ENTER inside <caption>, forcing it to <br>.
- Then, in the caption field in the dialog, we can simply display the innerHTML contents of <caption> in the field (maybe beautified by our simple writer), properly trimmed and without \n. It's an acceptable way for having it, in those few cases where users decide to do manipulations inside <caption>.
comment:5 Changed 14 years ago by
Replying to fredck:
it looks like the right fix is a bit more complex.
Not sure it's the right fix, note that apply heading or increase size on caption is quite a normal case, dialog should be just considered as (an less sufficient) compensation for WYSIWYG experience, right now instead u're proposing of treating it just for a comfortable dialog.
comment:6 follow-up: 12 Changed 14 years ago by
Well, it looks like we need better ways to justify our opinions here. The issue is much broader now and the right way to go is in fact ambiguous.
HTML4 (and therefore XHTML 1.0 Transitional) says that CAPTION must contain inline stuff only. This justified my previous opinion.
HTML5 instead changed this thing, saying that CAPTION accepts "Flow contents", which includes the basic block elements we're talking about. This change certainly comes from public opinion and makes a lot of sense.
So, better to walk towards the future and accept block elements inside <caption>. Sorry for the precipitated analysis.
In any case, I maintain my R- for the previous patch. The dialog must still maintain the caption editable. It's a valuable feature we don't want to loose.
comment:7 Changed 14 years ago by
Status: | review_failed → review |
---|
The dialog must still maintain the caption editable. It's a valuable feature we don't want to loose.
6663.patch was implemented exactly in this way (enabled field for text only caption), can do check it again?
Changed 14 years ago by
Attachment: | 6663_2.patch added |
---|
comment:9 Changed 14 years ago by
Status: | review → review_passed |
---|
comment:10 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Fixed with [6956].
comment:11 Changed 14 years ago by
Milestone: | → CKEditor 3.6.1 |
---|
comment:12 Changed 14 years ago by
The originally reported script error still occurs if the test case steps are followed. If you have the cursor in the caption and you try to create a table in that place, a script error is shown (in firebug). Perhaps in such a case the "create table" dialog shouldn't be available or active?
Please don't pack all issues in one ticket on bug reporting, confirmed that line breaks are not supported in table dialog.