Opened 4 years ago

Last modified 3 years ago

#12649 confirmed Bug

FF makes wrong selection of text

Reported by: BM Bulgaria Owned by:
Priority: Normal Milestone:
Component: Core : Selection Version: 3.0
Keywords: Firefox Cc:

Description

Let's have the following HTML:

<div>111<br></div>
<div>222 <br></div>

This we receive as we use divs for paragraphs and using magicline after 111. After 222 we have whitespace, it is not &nbsp; for FF. We select 222 (only 2s without the interval behind) and copy (CTRL+C) and then in the clipboard we have '222 '.

Steps to reproduce on the demo:

  1. Place the following HTML on empty CK area with firebug. Using source button in the demo clears the divs, so use firebug.
  2. Select the 222 text without the interval and make CTRL+C.
  3. Place the cursor among 111 and CTRL+V. The result is 1222 11.

The bug reproduces for the most of the cases, rarely it will work correct, even though on the demo we did not faced correct behaviour.

Change History (2)

comment:1 Changed 4 years ago by Jakub Ś

Keywords: Firefox added
Status: newconfirmed
Version: 4.4.53.0

This problem can be reproduced in native contenteditable elements. If you use below code:

<div style="margin:20px; border:1px solid black; width:500px;" contenteditable="true">
<div>111<br></div>
<div>222 <br></div>
</div>

and select 222 with mouse, you will get same result '222 '.

If you however click before ^222 and select it with keyboard Shift+(RightArrow x 3) you will get '222'. If on the other hand you select text with Shift+(RightArrow x 4) you will get '222 '.

This is known Firefox feature. You can read about it here:
http://dev.ckeditor.com/ticket/7796#comment:4
http://dev.ckeditor.com/ticket/8195
http://dev.ckeditor.com/ticket/3509


This looks like a duplicate of #3509. I will confirm it however.

It is possible that this issue will be fixed in CKEditor 4.5 when custom selection will be introduced.

comment:2 Changed 3 years ago by kkrzton

Still broken in FF 43.0 and CKEditor 4.5.6. When using double click for selecting 222 the space after also gets selected in FF, in Chrome only 222 gets selected.

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