Opened 13 years ago
Last modified 13 years ago
#9093 confirmed Bug
Enter command is broken (different behavior between browsers)
Reported by: | Piotrek Koszuliński | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 3.0 |
Keywords: | Cc: |
Description (last modified by )
TC1
- Open replacebyclass sample.
- Set content:
<p>aaa</p><p>bbb</p><p>ccc</p>
. - Select second paragraph (with mouse or keyboard).
- Press enter.
Expected: when EOL visually not selected (visual EOL selection is possible only on Webkits) enter command should remove content of selected paragraph (leaving the tag) and then create new one below.
Expected content: <p>aaa</p><p> </p><p>^ </p><p>ccc</p>
Actual: Ok on Firefox, ok on IE, Visually broken on Chrome and Opera. They remove content of paragraph and create new one but this new paragraph is not visible (See image). Only after you switch to source and back second paragraph is visually added.
TC2
Steps as in TC1. but select with EOL preceding second paragraph.
Expected: EOL is selected, so delete it with the content (move caret to <p>aaa^</p>
and then create new paragraph. I’m not sure why but this can be reproduced in all browsers – Just select {{{a bbb}} and press SHIFT+right arrow.
Expected content: <p>aaa</p><p>^ </p><p>ccc</p>
Actual: Visually it works in all browsers but if you switch to source and back you will see that new extra paragraph is added. All browsers delete contents of existing paragraph and add new one (Can be checked with E.g. Firebug) but it is only visible when switching to source and back.
TC3 (Webkit only)
Steps as in TC1. but select with EOL succeeding second paragraph.
Expected: EOL is selected, so delete it with the content (move caret to <p>^ccc</p>
and then create new paragraph. I’m not sure why but this can be reproduced in all browsers – Just select {{{a bbb}} and press SHIFT+right arrow.
Expected content: <p>aaa</p><p> </p><p>^ccc</p>
Actual: Visually it works in all browsers but if you switch to source and back you will see that new extra paragraph is added. All browsers delete contents of existing paragraph and add new one (Can be checked with E.g. Firebug) but it is only visible when switching to source and back.
TC4
I've got the following results when running these TCs (The same as for manual tests):
'test Enter key for paragraphs 1' : function() { var bot = this.editorBot; bot.setHtmlWithSelection( '<p>bam</p><p>[foo]</p><p>bar</p>' ); bot.execCommand( 'enter' ); assert.areSame( '<p>bam</p><p> </p><p> </p><p>bar</p>', bot.getData( false, true ) ); }, 'test Enter key for paragraphs 2a' : function() { var bot = this.editorBot; bot.setHtmlWithSelection( '<p>bam</p>[<p dir="rtl">foo</p>]<p dir="rtl" id="target">bar</p>' ); bot.execCommand( 'enter' ); assert.areSame( '<p>bam</p><p dir="rtl"> </p><p dir="rtl"> </p><p dir="rtl" id="target">bar</p>', bot.getData( false, true ) ); }, 'test Enter key for paragraphs 2b' : function() { var bot = this.editorBot; bot.setHtmlWithSelection( '[<p dir="rtl">foo</p>]<p dir="rtl" id="target">bar</p>' ); bot.execCommand( 'enter' ); assert.areSame( '<p dir="rtl"> </p><p dir="rtl"> </p><p dir="rtl" id="target">bar</p>', bot.getData( false, true ) ); }
Attachments (2)
Change History (4)
comment:1 Changed 13 years ago by
Version: | 3.6.4 (SVN - trunk) |
---|
comment:2 Changed 13 years ago by
Description: | modified (diff) |
---|---|
Status: | new → confirmed |
Version: | → 3.0 |
Changed 13 years ago by
Attachment: | Firefox.png added |
---|
Changed 13 years ago by
Attachment: | chrome.png added |
---|