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

Apr 27, 2015, 9:43:08 AM (5 years ago)
Artur Delura


  • Ticket #13140, comment 6

    initial v1  
    11With fresh mind I found out that everything is fine with ranges. But still true is that bookmark is removed and then tried to be used.
     3This [ comment] is very incisive. The problem here is following:
     5'''Step 0:''' Beginning:
     8    <widget></widget>
     12'''Step 1:''' Creating drag boomark (this code made mess with range offsets - see next bookmark creation)
     15    <bookmark drag start>
     16    <widget></widget>
     17    <bookmark drag end>
     21'''Step 2:''' Creating drop boomark
     24    <bookmark drag start>
     25    <widget></widget>
     26    <bookmark drop />
     27    <bookmark drag end>
     30Drop bookmark should be after drag end bookmark but it's in wrong position because adding <bookmark drag start> reorganised offset (++)
     34If we switch order of step first and the second we will fix this issue, but creates a new one the other way around (drag not right after but right before).
     37    <bookmark drag start>
     38    <bookmark drop />
     39    <widget></widget>
     40    <bookmark drag end>
     44We could introduce some mechanism for updating selection on bookmark creation but it might be painfull and time consuming. What I suggest instead is to right before starting internal drag, check whether there is something to do with it i.e. whether it will change something.
     46We can simply do it by comparing (drag end with drop end) or (drap start with drop start). If they are the same we don't have to do nothing.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy