Skip to content
  • Tomas Popela's avatar
    Fix drag and drop in composer · 79c60b13
    Tomas Popela authored
    Simplify how we handle the drag and drop. Now the drop is always handled
    by the EContentEditor first and then if the data are processed by the
    editor then it's handed to the EMsgComposer. Also the DOM operations
    are now handled on the web extension side to save some DBus calls.
    
    Correctly handle the history if the drop operation is copying the content
    and not moving it.
    
    Fix the history if we are dragging a content where there is a space
    before the selection start. WebKit will remove it unless there is a
    space after the selection end.
    
    Also there is a weird thing going on and I still don't know if it's caused
    by WebKit or Evolution. If dragging content around the editor sometimes the
    current selection is changed. The problem is that if moving the content,
    then WebKit is removing the currently selected content and at that point it
    could be a different one from the dragged one. So before the drop is
    performed we restore the selection to the state when the drag was initiated.
    79c60b13