Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 527140

Summary: Dragging file contents deletes it from file.
Product: [ECD] Orion Reporter: Casey Flynn <caseyflynn>
Component: ClientAssignee: Silenio Quarti <Silenio_Quarti>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P2 CC: steve_northover
Version: 16.0   
Target Milestone: 17.0   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Casey Flynn CLA 2017-11-10 17:29:48 EST
While developing in Orion file contents can be lost of you highlight them and drag them.

This happened to me while developing, it seems like a pretty serious bug.

Steps to reproduce:
1. Open a file in Orion
2. Select all text
3. Drag the text into the mini-nav (which is what I did by accident).

Outcome: All file contents are deleted. This can be un-done with a ctrl+z, but if a user were to not think about what just happened and refresh the page, with say, auto-save enabled, file contents are lost.
Comment 1 Silenio Quarti CLA 2017-11-13 10:34:04 EST
I do not see this as a bug as the user is doing a move DND operation.  It is possible to change the operation by pressing the Alt key (Cmd key on Mac).  But I checked  and most editors seem to only allow move DND operations to happen within the editor and if the drop target is another widget/app/editor, the DND operation is always copy.  I change the orion editor behaviour accordingly. 

Fixed by

https://github.com/eclipse/orion.client/commit/3885b1a2a0a87e7b734d2b5ace73816be925e041