Opened 13 years ago

Closed 8 years ago

#8146 closed Bug (duplicate)

Creating link continues onto second line

Reported by: Freddie Bingham Owned by:
Priority: Normal Milestone:
Component: General Version: 3.0
Keywords: Cc: mike@…

Description (last modified by Jakub Ś)

Using Chrome.

  1. Press the "Link" button.
  2. Enter "www.google.com", press "Ok"
  3. Observe that the selected link is placed into the editor.
  4. Press "End" to cancel the highlight and get cursor at end of link.
  5. Type "ABC".
  6. Observe that the characters aren't linked - which is correct.
  7. Delete these three characters with backspace
  8. If in ENTER_P mode, press, shift-enter, if in ENTER_BR, just press enter.
  9. Type "ABC".
  10. Note that "ABC" becomes linked, which it should not.

Simplified TC:

  1. In Chrome, Safari or Opera, having enter mode set to BR, clean editor contents using new page
  2. Click link button and insert link
  3. Press END button
  4. Press Enter (if you start typing everything is ok)
  5. Start typing - link is continued.

Attachments (2)

8146.diff (763 bytes) - added by Freddie Bingham 12 years ago.
shift enter and links issue.png (64.1 KB) - added by Mariano Dal Vecchio 10 years ago.

Download all attachments as: .zip

Change History (15)

comment:1 Changed 13 years ago by Jakub Ś

Status: newconfirmed
Version: 3.6.13.0

I have managed to reproduce your TC in Webkit and Opera from CKEditor 3.0.

NOTE: Following your TC I did not produce the link in Firefox because I was out of link boundaries (See https://dev.ckeditor.com/ticket/7796#comment:4 and #8195). But if after step 7. I pressed left arrow and then right arrow I could see on ElementsPath that I was in side of the link (problems on Webkit, IE and Opera with elementsPath are reported in #8149) although cursor was in the same place as after pressing BACKSPACE 3 times. Pressing SHIFT+ENTER broke the link and continued it in next line.

Last edited 12 years ago by Jakub Ś (previous) (diff)

comment:2 Changed 12 years ago by Freddie Bingham

Regardless of the pasting issue, this specific problem seems fixable. Is there any reason that shift-enter can't be made to just break out of an URL. Can the boundaries be manipulated in this manner for web-kit?

comment:3 Changed 12 years ago by Freddie Bingham

The attached diff appears to fix the problem for me in Webkit and Opera. It also fixes the issue in Opera where shift-enter after the link does not move the cursor down. As it is now, the Opera cursor appears to move to the top left corner until text is typed after pressing shift-enter.

Changed 12 years ago by Freddie Bingham

Attachment: 8146.diff added

comment:5 Changed 12 years ago by Jakub Ś

#9276 was marked as duplicate.

comment:6 Changed 11 years ago by Jakub Ś

Description: modified (diff)

Problem can also be reproduced in CKE 4.x (v4) in Opera Chrome Safari.

NOTE: In Opera it only works if you press End after creating link. If you click at the end of created link it will not be continued on Enter press. In Webkit both pressing End and clicking at the end work.

Version 1, edited 11 years ago by Jakub Ś (previous) (next) (diff)

comment:7 Changed 11 years ago by Jakub Ś

#9993 was marked as duplicate.

comment:8 Changed 11 years ago by Jakub Ś

#10154 was marked as dupliacte.

TC from that ticket:

  1. Load this HTML:
<p>1. Select the whole link:</p>
<p><a href="http://ckeditor.com">My link</a></p>
<p>2. Start typing... just the first letter will be linked.</p>
  1. Select the whole link line.
  2. Type "test".

comment:9 Changed 11 years ago by Mike Burgh

Cc: mike@… added

comment:10 Changed 10 years ago by Jakub Ś

There are two other tickets that concern exiting link in Firefox: #10966, #6680, #10709.

Last edited 10 years ago by Jakub Ś (previous) (diff)

comment:11 Changed 10 years ago by Jakub Ś

#11006 was marked as duplictae.

comment:12 Changed 10 years ago by Jakub Ś

I think in terms of general view on links and solution this issue is strongly related to #10709.

Changed 10 years ago by Mariano Dal Vecchio

comment:13 Changed 10 years ago by Mariano Dal Vecchio

This issue can also be reproduced by using the arrow keys to enter the link and then exit it.

I mean, if you create a link and press END the cursor is properly position outside the anchor tag BUT if you press LEFT ARROW and RIGHT ARROW while being at the end of the link, the cursor remains inside the link so no matter if you press a letter, space or SHIFT+ENTER, anything you type is part of the anchor.

The only keys that break this behaviour are the ENTER key which properly ends the anchor or the END key which takes the cursor outside of it.

This is reproducible in the demo page also. Image shift enter and links issue.png​ attached

Last edited 10 years ago by Mariano Dal Vecchio (previous) (diff)

comment:14 Changed 8 years ago by kkrzton

Resolution: duplicate
Status: confirmedclosed

The issue with link handling in all mentioned browser but FF was solved. Due to different selection behavior in FF the tc can still be reproduced (FF 43.0, CKEditor 4.5.6) but it is the same as #14288. Marked as duplicate.

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