Opened 10 years ago

Last modified 10 years ago

#13071 confirmed Bug

Select content on drop, move selection to the end on paste

Reported by: Piotr Jasiun Owned by:
Priority: Normal Milestone:
Component: General Version: 4.5.0 Beta
Keywords: Cc:

Description (last modified by Piotr Jasiun)

All application I tested have a different behavior for copy and paste and for drag and drop.

  • After paste, caret is at the end of the pasted content (what makes sense, user most probably wants to start typing there).
  • After drop, dropped content is selected (what also makes sense, because it may happen that user drops the content in not exactly correct position and wants to drag it again).

At the moment we always put the caret at the end, handle the drop in the "paste" way. The problem is that now insertHtml set the selection and this method does not know what operation causes insertion. Fortunately paste event has such information, so the selection should be done by paste event or information about the type of the selection should be passed to the insertHtml. The second way seems to be better because of backward compatibility.

Change History (2)

comment:1 Changed 10 years ago by Piotr Jasiun

Description: modified (diff)

comment:2 Changed 10 years ago by Piotrek Koszuliński

Status: newconfirmed

Remember that the range into which you insert content is not the range that you can select after insertion - this wont work. It would require some rather hard changes in the insertHtml method to have this kind of range, so I don't think that we'll be able to fix this soon.

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