Changes between Initial Version and Version 1 of Ticket #13140, comment 5


Ignore:
Timestamp:
Apr 24, 2015, 2:30:01 PM (5 years ago)
Author:
Artur Delura
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #13140, comment 5

    initial v1  
    1 The problem is simply because dragRange is the same as dropRange. During the internal D&D we create a bookmark for dragRange and then clear dragRange contents to move it somewhere else. When contents is removed also bookmark is (unintentionally). Then we try to relate to bookmark which doesn't exists already.
     1The problem is simply because dragRange is the same as dropRange. During the [https://github.com/cksource/ckeditor-dev/blob/d13c4a7c065fd6cb5269cab86342d45084c96fbf/plugins/clipboard/plugin.js#L1382-L1426 internal D&D] we [https://github.com/cksource/ckeditor-dev/blob/d13c4a7c065fd6cb5269cab86342d45084c96fbf/plugins/clipboard/plugin.js#L1404 create a bookmark] for dragRange and then [https://github.com/cksource/ckeditor-dev/blob/d13c4a7c065fd6cb5269cab86342d45084c96fbf/plugins/clipboard/plugin.js#L1414 clear dragRange contents] to [https://github.com/cksource/ckeditor-dev/blob/d13c4a7c065fd6cb5269cab86342d45084c96fbf/plugins/clipboard/plugin.js#L1418 move it] somewhere else. When contents is removed also bookmark is (unintentionally). Then we try to relate to bookmark which [https://github.com/cksource/ckeditor-dev/blob/4d1ecc4923254682c3978faa3c8e427134d68298/core/dom/range.js#L923 doesn't exists already].
    22
    3 To fix this issue we can check whether dragRange and dropRange are the same. If so we don't have to do nothing, because it means that user want to drop content in the same place.
     3To fix this issue we can check [https://github.com/cksource/ckeditor-dev/blob/d13c4a7c065fd6cb5269cab86342d45084c96fbf/plugins/clipboard/plugin.js#L1386 somewhere here] whether dragRange and dropRange are the same. If so we don't have to do nothing, because it means that user want to drop content in the same place.
    44
    55The question is whether it's okay that dropRange is not collapsed. If it's wrong then we should fix it as well, or maybe just this.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy