Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#12329 closed Bug (duplicate)

Link continues on new line when pressing enter. If CK is in enterMode = CKEDITOR.ENTER_BR. On FF only

Reported by: elce Owned by:
Priority: Normal Milestone:
Component: General Version: 4.4.3
Keywords: Cc:

Description

Link continues on new line when pressing enter.
This behavior only appears when CK is in enterMode = CKEDITOR.ENTER_BR.

Affected Browser: Firefox only (With no add-ons loaded).

Reproduction Steps:

  1. Click insert new link button.
  2. Just insert some URL (test.org).
  3. Click ok.
  4. Deselect the link with 'right cursor' key.
  5. Press Enter.
  6. Insert some text.

The inserted text will be marked as link. (Tested on demo and nightly)

Attachments (1)

Unbenannt.png (48.7 KB) - added by elce 10 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 10 years ago by elce

Firefox version: 24.6.0

comment:2 Changed 10 years ago by Jakub Ś

Resolution: duplicate
Status: newclosed

This issue is a duplicate of #3509. It all depends whether cursor is inside or outside of element boundaries.

Elements path shows exactly where you are. When you press right arrow, you are still in link element. When you press End button you leave link and it won't be continued in new line.

Good explanation of this problem can be found under this comment

comment:3 Changed 10 years ago by elce

Ok thanks.

And there is also explained why it works for different enterModes? (CKEDITOR.ENTER_P and CKEDITOR.ENTER_DIV) but not for CKEDITOR.ENTER_BR?

Changed 10 years ago by elce

Attachment: Unbenannt.png added

comment:4 in reply to:  2 Changed 10 years ago by elce

Replying to j.swiderski:

This issue is a duplicate of #3509. It all depends whether cursor is inside or outside of element boundaries.

Elements path shows exactly where you are. When you press right arrow, you are still in link element. When you press End button you leave link and it won't be continued in new line.

Good explanation of this problem can be found under this comment

please take a look at the screenshot I took. Thanks

comment:5 Changed 10 years ago by Jakub Ś

NOTE: At the moment links in editor are treated as inline elements only. In HTML5 they can be block or inline but we haven't implemented this feature yet.

There is also explained why it works for different enterModes? (CKEDITOR.ENTER_P and CKEDITOR.ENTER_DIV) but not for CKEDITOR.ENTER_BR?

Enter mode means that when you press enter some tag representing new line in entered. In case of P and Div there are no problems. They are block-level tags so when you press enter you get out of link (editor takes care of this). In case of BR, well this tag can be placed inside link so this is why it is possible to have link continued in the second line.

Please press End to get out of the link as explained in comment:3 and remember that elements path shows where you are what may be also helpful.

comment:6 in reply to:  5 Changed 10 years ago by elce

Replying to j.swiderski:

NOTE: At the moment links in editor are treated as inline elements only. In HTML5 they can be block or inline but we haven't implemented this feature yet.

There is also explained why it works for different enterModes? (CKEDITOR.ENTER_P and CKEDITOR.ENTER_DIV) but not for CKEDITOR.ENTER_BR?

Enter mode means that when you press enter some tag representing new line in entered. In case of P and Div there are no problems. They are block-level tags so when you press enter you get out of link (editor takes care of this). In case of BR, well this tag can be placed inside link so this is why it is possible to have link continued in the second line.

Please press End to get out of the link as explained in comment:3 and remember that elements path shows where you are what may be also helpful.

Ok I understand. Thanks a lot!

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