Opened 7 years ago

Last modified 6 years ago

#5479 review Bug

[IE] Cursor after table at the end of document in enterMode=BR

Reported by: garry.yao Owned by: garry.yao
Priority: Normal Milestone:
Component: General Version: 3.0
Keywords: IE Cc:

Description (last modified by garry.yao)

Environment

IE8 standards, with enterMode = BR.

Reproducing Procedures

  1. Load any of the sample page and fill the editor with the following contents:
    <table>
    	<tbody>
    		<tr>
    			<td>
    				text</td>
    		</tr>
    	</tbody>
    </table>
    
  2. Click into the spaces after the table at the end of document.
  • Expected Result: It's possible to have the cursor blinking there and start typing.
  • Actual Result: Cursor stays as it is.

Attachments (22)

5479.patch (1013 bytes) - added by garry.yao 6 years ago.
5479_2.patch (553 bytes) - added by garry.yao 6 years ago.
5479_3.patch (2.8 KB) - added by garry.yao 6 years ago.
5479_4.patch (3.6 KB) - added by garry.yao 6 years ago.
5479_4.png (22.1 KB) - added by wwalc 6 years ago.
5479_5.patch (4.0 KB) - added by garry.yao 6 years ago.
5479_6.patch (4.1 KB) - added by garry.yao 6 years ago.
5479_6.png (6.4 KB) - added by wwalc 6 years ago.
5479_7.patch (5.1 KB) - added by garry.yao 6 years ago.
5479_8.patch (7.9 KB) - added by garry.yao 6 years ago.
5479_8_ie6.png (25.3 KB) - added by wwalc 6 years ago.
5479_9.patch (9.3 KB) - added by garry.yao 6 years ago.
5479_10.patch (4.7 KB) - added by garry.yao 6 years ago.
5479_11.patch (7.3 KB) - added by garry.yao 6 years ago.
5479_12.patch (7.8 KB) - added by garry.yao 6 years ago.
5479_13.patch (12.2 KB) - added by garry.yao 6 years ago.
5479_14.patch (12.7 KB) - added by garry.yao 6 years ago.
5479_15.patch (13.6 KB) - added by garry.yao 6 years ago.
5479_16.patch (9.8 KB) - added by garry.yao 6 years ago.
5479_17.patch (11.0 KB) - added by garry.yao 6 years ago.
5479_18.patch (10.8 KB) - added by garry.yao 6 years ago.
5479_19.patch (12.4 KB) - added by garry.yao 6 years ago.

Download all attachments as: .zip

Change History (76)

comment:1 Changed 7 years ago by garry.yao

  • Description modified (diff)

WFM in IE6/7.

comment:2 Changed 7 years ago by fredck

  • Milestone set to CKEditor 3.4

Changed 6 years ago by garry.yao

comment:3 Changed 6 years ago by garry.yao

  • Keywords IE Confirmed Review? added
  • Owner set to garry.yao
  • Status changed from new to assigned

comment:4 Changed 6 years ago by fredck

  • Keywords IE Confirmed added; IEConfirmed removed
  • Milestone CKEditor 3.4 deleted

comment:5 follow-up: Changed 6 years ago by wwalc

  • Milestone set to CKEditor 3.5.1

The patch needs to be updated. Same problem with horizontal line and page break for printing.

comment:6 in reply to: ↑ 5 Changed 6 years ago by Saare

  • Status changed from review to review_failed

The patch needs to be updated. Same problem with horizontal line and page break for printing.

Changed 6 years ago by garry.yao

comment:7 Changed 6 years ago by garry.yao

  • Description modified (diff)
  • Keywords Confirmed removed
  • Status changed from review_failed to review

comment:8 Changed 6 years ago by Saare

  • Status changed from review to review_failed

There is now redundant NBSP in the content. Also, I don't see the problem is fixed for HR and page break for printing.

comment:9 Changed 6 years ago by garry.yao

  • Status changed from review_failed to review

Proposing a new approach for handling body padding in IE that eliminates placer holder text.

Changed 6 years ago by garry.yao

comment:10 follow-up: Changed 6 years ago by Saare

  • Status changed from review to review_failed

Interesting approach;

  • In IE, The approach doesn't work for me using enterMode=BR.
  • In FF, double clicking on the element makes the cursor disappear.

Changed 6 years ago by garry.yao

comment:11 in reply to: ↑ 10 Changed 6 years ago by garry.yao

  • Status changed from review_failed to review

Replying to Saare:

  • In IE, The approach doesn't work for me using enterMode=BR.

It actually works for IE with enterBr in obscurity, as the cursor is displayed at wrong position while once you start typing, inputed are placed at the correct place, I understand it's an usability issue, while fortunately it works just fine in enterP mode (with the help of autoParagraph).

comment:12 Changed 6 years ago by Saare

  • Status changed from review to review_failed

[IE] Create a table using the dialog. Write a letter. Press BACKSPACE 2 times. Note that the caret went to the last cell, and it's now again impossible to click beneath the table.

comment:13 Changed 6 years ago by garry.yao

  • Status changed from review_failed to review

WFM in IE8 (it's still possible to click beneath the table), in IE7 BACKSPACE removes the entire table instead.

comment:14 Changed 6 years ago by Saare

  • Status changed from review to review_failed

WFM now as well;

  • If there is already a paragrpah above the div, it should not appear, as it only adds additional height with no benefits.
  • [IE, enterMode=BR] Insert a table with lots of rows. Click beneath the table. Note that the editor scrolls to top, but places the caret "correctly" (comment:10). Type some text, note that the text goes into the last cell.

comment:15 Changed 6 years ago by wwalc

IE8, I'm unable to type any content both by clicking below the table or using arrow keys to move down below the table.

Initial source:

<table border="1" cellpadding="1" cellspacing="1" style="width: 500px">
	<tbody>
		<tr>
			<td>
				one</td>
			<td>
				two</td>
		</tr>
		<tr>
			<td>
				three</td>
			<td>
				four</td>
		</tr>
	</tbody>
</table>

In FF 3.6.13 I do not see the cursor blinking, so it's not intuitive that I can type at this moment below the table.

In Safari the cursor is blinking, but all the content is lost after switching to source and a div element is visible in the elements path.

Changed 6 years ago by wwalc

comment:16 Changed 6 years ago by wwalc

The attached screenshot shows the problem with Safari: attachment:5479_4.png

comment:17 Changed 6 years ago by wwalc

Actually, why not simply add extra <br /> elements at the end of document when the last element is the one that is causing problems?

Note that at this moment it looks like the last two line breaks after the element which is causing problems are always removed from the source when switching to source mode. To reproduce, try the following and switch to source mode and back with enter mode br:

<hr />
<br />
<br />
<br />

Changed 6 years ago by garry.yao

comment:18 Changed 6 years ago by garry.yao

  • Status changed from review_failed to review

I understand the cursor stop blinking (or blinking at wrong position) might be counterintuitive, but I think user will still give it a try.

@wwalc The safari issue has been tackled with the last patch.

comment:19 Changed 6 years ago by wwalc

  • Status changed from review to review_failed

Works better in Safari, but does not work with Opera.

Changed 6 years ago by garry.yao

comment:20 Changed 6 years ago by garry.yao

  • Status changed from review_failed to review

Opera problem and cursor blinking problem resolved with new patch.

Changed 6 years ago by wwalc

comment:21 Changed 6 years ago by wwalc

  • Status changed from review to review_failed

The position of the cursor in IE is still very confusing, I wouldn't dare typing seeing this: attachment:5479_6.png

comment:22 Changed 6 years ago by wwalc

I've reported in #6984 disappearing line breaks mentioned in comment:17.

Theoretically we could use <br> elements instead of <div> to add a line break after tables and horizontal rules. This extra BR tag could have a special attribute. Once finding such a <br> element at the end of the document we could simply remove it before switching to source mode. When finding such line break in the middle of the document, we would just remove the attribute from it.

comment:23 Changed 6 years ago by garry.yao

  • Status changed from review_failed to review

Changed 6 years ago by garry.yao

comment:24 follow-up: Changed 6 years ago by Saare

  • Status changed from review to review_failed

Both issues could be reproduced using a sample table:

<table border="1" cellpadding="1" cellspacing="1" style="width: 500px">
	<tbody>
		<tr>
			<td>
				&nbsp;</td>
			<td>
				&nbsp;</td>
		</tr>
	</tbody>
</table>
  • In FF the bogus BR is not removed.
  • Hit CTRL+A. Click on RTL icon. Click on the pad. Note that the paragraph is LTR while it should be RTL.

Changed 6 years ago by garry.yao

comment:25 in reply to: ↑ 24 Changed 6 years ago by garry.yao

  • Status changed from review_failed to review

Replying to Saare:

  • In FF the bogus BR is not removed.

Caused by a bug of element::appendBogus, addressed in new patch.

  • Hit CTRL+A. Click on RTL icon. Click on the pad. Note that the paragraph is LTR while it should be RTL.

Nice catch, the issue is now resolved in enterP/DIV, while it's difficult to featue smart text direction for enterBr though, we could leave it to be handled by later ticket.

comment:26 Changed 6 years ago by wwalc

  • Status changed from review to review_failed

IE6, type some text below a table, press enter. See the screenshot.

Changed 6 years ago by wwalc

comment:27 Changed 6 years ago by garry.yao

  • Status changed from review_failed to review

The IE6 issue is not part of this ticket, please apply the patch at #6992 before testing.

comment:28 Changed 6 years ago by wwalc

  • Status changed from review to review_failed

Safari 5 @ win: clear all contents, click on an empty editing area with enter mode br.

Result:

TypeError: Result of expression 'last' [null] is not an object.
wysiwygarea/plugin.js, line 690.

Changed 6 years ago by garry.yao

comment:29 Changed 6 years ago by garry.yao

  • Status changed from review_failed to review

comment:30 Changed 6 years ago by fredck

  • Status changed from review to review_failed

There are two problems with this approach, which can be verified with Firefox:

  • It's not anymore possible to place the cursor is a specific text position by clicking in the white-space following the text. Before the patch, when you click in the space bellow the middle of the text, the cursor is positioned in that precise point. After patch, it goes always to the end of the text.
  • It's not anymore possible to drag things from outside the editor into the blank space following the text. This is a more serious thing, because I know that people is using this kind of drag-and-drop solution out there.

Considering this is an IE issue, shouldn't we come with an IE only solution at that point, instead of changing the behavior for all browsers?

Changed 6 years ago by garry.yao

comment:31 Changed 6 years ago by garry.yao

  • Status changed from review_failed to review

@Fred, I'm concerning mainly the first mentioned issue, the second one WFM in some similar way, anyway it's a pity that the solution finally couldn't apply.

comment:32 Changed 6 years ago by wwalc

  • Status changed from review to review_failed

Does not work in Safari, the cursor is blinking below the horizontal line, but once you start typing the letters are above it.

To reproduce simply try typing after

<hr />

Changed 6 years ago by garry.yao

comment:33 Changed 6 years ago by garry.yao

  • Status changed from review_failed to review

Changed 6 years ago by garry.yao

comment:34 Changed 6 years ago by wwalc

  • Status changed from review to review_failed

In DIV enter mode an extra div tag is added when switching from wysiwyg to source mode, after switching few times I ended up with:

<div>
	&nbsp;</div>
<div>
	&nbsp;</div>
<div>
	&nbsp;</div>
<div>
	&nbsp;</div>
<div>
	&nbsp;</div>

comment:35 Changed 6 years ago by garry.yao

  • Status changed from review_failed to review

Changed 6 years ago by garry.yao

comment:36 Changed 6 years ago by wwalc

  • Status changed from review to review_failed

IE6 div enter mode:

  • click with a mouse below horizontal line, start typing: text is inserted above the line

IE8 div enter mode:

  • cursor is blinking at the beginning of the editing area straight after inserting the horizontal line

comment:37 Changed 6 years ago by Saare

Another failed TC (IE7):

  • Create a table.
  • Click bebeath it and type some text.
  • Switch to source. Bogus &nbsp; is there.

Changed 6 years ago by garry.yao

comment:38 Changed 6 years ago by garry.yao

  • Status changed from review_failed to review

@Saar, your TC already exists in current trunk when editing empty paragraph from source thus will not be part of the patch.

comment:39 Changed 6 years ago by Saare

  • Status changed from review to review_failed

With enterMode = BR:

  • Insert a table using the dialog.
  • Click beneath.
  • Type a few words and press ENTER.

Note that the caret is before the content and the enter is now above it.

comment:40 Changed 6 years ago by wwalc

  1. Clear all contents
  2. Insert a table
  3. Type "AAA", press enter 4 times (AAA was moved down)
  4. Click with a mouse below the table
  5. Type "BBB", press enter
  6. Result: cursor is straight above "AAA", not straight below "BBB"

comment:41 Changed 6 years ago by wwalc

  • Milestone changed from CKEditor 3.5.1 to CKEditor 3.5.2

comment:42 Changed 6 years ago by Saare

A few more:

  • When creating a table and putting the cursor beneath it, the span element is visible in the elements path.
  • * Create a table with the dialog, the cursor is now beneath it.
  • * Before typing any text, choose a color from color panel.
  • * Type some text.
  • * The text is not painted. Going to source shows redundant span.

Changed 6 years ago by garry.yao

comment:43 Changed 6 years ago by garry.yao

  • Status changed from review_failed to review

comment:44 Changed 6 years ago by Saare

  • Status changed from review to review_failed

Please update the patch.

Changed 6 years ago by garry.yao

comment:45 Changed 6 years ago by garry.yao

  • Status changed from review_failed to review

We need a new start after [6461], as the temporary filler could benefit this situation where we can forget the padding node solution we have before.

comment:46 follow-up: Changed 6 years ago by Saare

  • Status changed from review to review_failed

IE:

  • Add a table.
  • Put the caret beneath the table.
  • Write one character.
  • Hit BACKSPACE.

The table is unexpectedly being removed.

comment:47 in reply to: ↑ 46 Changed 6 years ago by garry.yao

Replying to Saare:

The table is unexpectedly being removed.

WFM in all IE versions, need more clues.

comment:48 follow-up: Changed 6 years ago by Saare

Does not happen for me too anymore, but:
With the same steps, enterMode BR, IE8, the caret goes into the last cell instead of staying in the same line.

Changed 6 years ago by garry.yao

comment:49 in reply to: ↑ 48 Changed 6 years ago by garry.yao

  • Status changed from review_failed to review

Replying to Saare:

Does not happen for me too anymore, but:
With the same steps, enterMode BR, IE8, the caret goes into the last cell instead of staying in the same line.

The mission is making it possible to adding stuff at the end of document in all situation, but not to establish line-height for the last empty line or so, the issue you mentioned here is not addressable for now and being way less critical than the bug itself.

New patch fixes a bug that makes it possible to open block format once cursor is blinking at the end of doc.

comment:50 Changed 6 years ago by Saare

  • Status changed from review to review_failed

L109, why is a number symbol being added instead of a zero-width char?

Changed 6 years ago by garry.yao

comment:51 Changed 6 years ago by garry.yao

  • Status changed from review_failed to review

I've included other commonly used block that are also unable to exit from at the doc end, e.g. list, and relief the original assumption that IE<8 don't need the fix.

comment:52 Changed 6 years ago by Saare

  • Status changed from review to review_failed

IE8, enterMode BR, after performing the initial case described in the ticket:

  • Open the format combo, choose heading 1.
  • Type a letter.
  • Hit CTRL+Z.

JS error occurs.

Changed 6 years ago by garry.yao

comment:53 Changed 6 years ago by garry.yao

  • Status changed from review_failed to review

comment:54 Changed 6 years ago by wwalc

  • Milestone CKEditor 3.5.3 deleted

We're definitely having too many problems with this ticket, so postponing.

Note: See TracTickets for help on using tickets.
© 2003 – 2016 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy