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


Ignore:
Timestamp:
Apr 27, 2015, 7:19:21 AM (5 years ago)
Author:
Artur Delura
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #13140, comment 5

    v1 v2  
    1 The 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].
     1~~The 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 [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.
     3~~To 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
    5 The 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.
     5~~The 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