Opened 7 years ago

Last modified 9 months 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 7 years ago.
5479_2.patch (553 bytes) - added by Garry Yao 7 years ago.
5479_3.patch (2.8 KB) - added by Garry Yao 7 years ago.
5479_4.patch (3.6 KB) - added by Garry Yao 7 years ago.
5479_4.png (22.1 KB) - added by Wiktor Walc 7 years ago.
5479_5.patch (4.0 KB) - added by Garry Yao 7 years ago.
5479_6.patch (4.1 KB) - added by Garry Yao 7 years ago.
5479_6.png (6.4 KB) - added by Wiktor Walc 7 years ago.
5479_7.patch (5.1 KB) - added by Garry Yao 7 years ago.
5479_8.patch (7.9 KB) - added by Garry Yao 7 years ago.
5479_8_ie6.png (25.3 KB) - added by Wiktor Walc 7 years ago.
5479_9.patch (9.3 KB) - added by Garry Yao 7 years ago.
5479_10.patch (4.7 KB) - added by Garry Yao 7 years ago.
5479_11.patch (7.3 KB) - added by Garry Yao 7 years ago.
5479_12.patch (7.8 KB) - added by Garry Yao 7 years ago.
5479_13.patch (12.2 KB) - added by Garry Yao 7 years ago.
5479_14.patch (12.7 KB) - added by Garry Yao 7 years ago.
5479_15.patch (13.6 KB) - added by Garry Yao 7 years ago.
5479_16.patch (9.8 KB) - added by Garry Yao 7 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 (79)

comment:1 Changed 7 years ago by Garry Yao

Description: modified (diff)

WFM in IE6/7.

comment:2 Changed 7 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.4

Changed 7 years ago by Garry Yao

Attachment: 5479.patch added

comment:3 Changed 7 years ago by Garry Yao

Keywords: IE Confirmed Review? added
Owner: set to Garry Yao
Status: newassigned

comment:4 Changed 7 years ago by Frederico Caldeira Knabben

Keywords: IE Confirmed added; IEConfirmed removed
Milestone: CKEditor 3.4

comment:5 Changed 7 years ago by Wiktor Walc

Milestone: 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 7 years ago by Sa'ar Zac Elias

Status: reviewreview_failed

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

Changed 7 years ago by Garry Yao

Attachment: 5479_2.patch added

comment:7 Changed 7 years ago by Garry Yao

Description: modified (diff)
Keywords: Confirmed removed
Status: review_failedreview

comment:8 Changed 7 years ago by Sa'ar Zac Elias

Status: reviewreview_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 7 years ago by Garry Yao

Status: review_failedreview

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

Changed 7 years ago by Garry Yao

Attachment: 5479_3.patch added

comment:10 Changed 7 years ago by Sa'ar Zac Elias

Status: reviewreview_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 7 years ago by Garry Yao

Attachment: 5479_4.patch added

comment:11 in reply to:  10 Changed 7 years ago by Garry Yao

Status: review_failedreview

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 7 years ago by Sa'ar Zac Elias

Status: reviewreview_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 7 years ago by Garry Yao

Status: review_failedreview

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

comment:14 Changed 7 years ago by Sa'ar Zac Elias

Status: reviewreview_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 7 years ago by Wiktor Walc

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 7 years ago by Wiktor Walc

Attachment: 5479_4.png added

comment:16 Changed 7 years ago by Wiktor Walc

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

comment:17 Changed 7 years ago by Wiktor Walc

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

Attachment: 5479_5.patch added

comment:18 Changed 7 years ago by Garry Yao

Status: review_failedreview

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 7 years ago by Wiktor Walc

Status: reviewreview_failed

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

Changed 7 years ago by Garry Yao

Attachment: 5479_6.patch added

comment:20 Changed 7 years ago by Garry Yao

Status: review_failedreview

Opera problem and cursor blinking problem resolved with new patch.

Changed 7 years ago by Wiktor Walc

Attachment: 5479_6.png added

comment:21 Changed 7 years ago by Wiktor Walc

Status: reviewreview_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 7 years ago by Wiktor Walc

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

Status: review_failedreview

Changed 7 years ago by Garry Yao

Attachment: 5479_7.patch added

comment:24 Changed 7 years ago by Sa'ar Zac Elias

Status: reviewreview_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 7 years ago by Garry Yao

Attachment: 5479_8.patch added

comment:25 in reply to:  24 Changed 7 years ago by Garry Yao

Status: review_failedreview

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 7 years ago by Wiktor Walc

Status: reviewreview_failed

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

Changed 7 years ago by Wiktor Walc

Attachment: 5479_8_ie6.png added

comment:27 Changed 7 years ago by Garry Yao

Status: review_failedreview

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

comment:28 Changed 7 years ago by Wiktor Walc

Status: reviewreview_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 7 years ago by Garry Yao

Attachment: 5479_9.patch added

comment:29 Changed 7 years ago by Garry Yao

Status: review_failedreview

comment:30 Changed 7 years ago by Frederico Caldeira Knabben

Status: reviewreview_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 7 years ago by Garry Yao

Attachment: 5479_10.patch added

comment:31 Changed 7 years ago by Garry Yao

Status: review_failedreview

@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 7 years ago by Wiktor Walc

Status: reviewreview_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 7 years ago by Garry Yao

Attachment: 5479_11.patch added

comment:33 Changed 7 years ago by Garry Yao

Status: review_failedreview

Changed 7 years ago by Garry Yao

Attachment: 5479_12.patch added

comment:34 Changed 7 years ago by Wiktor Walc

Status: reviewreview_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 7 years ago by Garry Yao

Status: review_failedreview

Changed 7 years ago by Garry Yao

Attachment: 5479_13.patch added

comment:36 Changed 7 years ago by Wiktor Walc

Status: reviewreview_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 7 years ago by Sa'ar Zac Elias

Another failed TC (IE7):

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

Changed 7 years ago by Garry Yao

Attachment: 5479_14.patch added

comment:38 Changed 7 years ago by Garry Yao

Status: review_failedreview

@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 7 years ago by Sa'ar Zac Elias

Status: reviewreview_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 7 years ago by Wiktor Walc

  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 7 years ago by Wiktor Walc

Milestone: CKEditor 3.5.1CKEditor 3.5.2

comment:42 Changed 7 years ago by Sa'ar Zac Elias

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

Attachment: 5479_15.patch added

comment:43 Changed 7 years ago by Garry Yao

Status: review_failedreview

comment:44 Changed 7 years ago by Sa'ar Zac Elias

Status: reviewreview_failed

Please update the patch.

Changed 7 years ago by Garry Yao

Attachment: 5479_16.patch added

comment:45 Changed 7 years ago by Garry Yao

Status: review_failedreview

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 Changed 6 years ago by Sa'ar Zac Elias

Status: reviewreview_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 Changed 6 years ago by Sa'ar Zac Elias

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

Attachment: 5479_17.patch added

comment:49 in reply to:  48 Changed 6 years ago by Garry Yao

Status: review_failedreview

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 Sa'ar Zac Elias

Status: reviewreview_failed

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

Changed 6 years ago by Garry Yao

Attachment: 5479_18.patch added

comment:51 Changed 6 years ago by Garry Yao

Status: review_failedreview

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 Sa'ar Zac Elias

Status: reviewreview_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

Attachment: 5479_19.patch added

comment:53 Changed 6 years ago by Garry Yao

Status: review_failedreview

comment:54 Changed 6 years ago by Wiktor Walc

Milestone: CKEditor 3.5.3

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

comment:55 Changed 9 months ago by Anup

Version: 3.04.5.11

comment:56 Changed 9 months ago by Anup

This issue is reproducible on 4.5.11 as well.

comment:57 Changed 9 months ago by Jakub Ś

Version: 4.5.113.0

Version is used to indicate when problem has started occurring. Don't change it.

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