In most operating systems or window systems you can abort a mouse drag handler by pressing the Escape button. And sometimes you can cancel the even by finding or using a "drag cancel" target like Mac os's top menu. For example in most Windows you will notice cursor changes to circle with line through it, like a classic No Smoking sign or No Diving type of sign in the real world ;)
In the case of OP, they are using GNOME / Firefox:
In Gnome, in most cases hitting escape key before letting go of mouse button will (should) cancel the drag/drop event. It is even part of their dev guidelines:
http://developer.gnome.org/hig-book/3.2/input-mouse.html.en#drag-drop-override
Allow all mouse operations to be cancelled before their completion.
Pressing the Esc key should cancel any mouse operation in progress,
such as dragging and dropping a file in a file manager, or drawing a
shape in a drawing application.
and..
Allow the user to cancel a drag and drop operation by all of these
methods:
- pressing Esc before releasing the mouse button dropping the object
- back on its original location performing a query drag and selecting
- Cancel on the pop-up menu (see Section 10.1.3.1.2 ― Query Drag)
- dropping the object on an invalid drop target.
I am sure it is the same in KDE from doing a few searches
On Mozilla dev's Drop Event
drop
The drop event is fired on the element where the drop was occured
at the end of the drag operation. A listener would be responsible for
retrieving the data being dragged and inserting it at the drop
location. This event will only fire if a drop is desired. It will not
fire if the user cancelled the drag operation, for example by pressing
the Escape key, or if the mouse button was released while the mouse
was not over a valid drop target. For information about this, see
Performing a Drop.
I never said this would work all the time in EVERY setup, for example I don't think this works on Ubuntu which is kind of lame. I remember the drag event abort working with the Escape key since in wondows since version 3.1.
In all MS Windows operating systems in almost all (properly coded) applications:
- hitting the escape key before releasing the mouse button during a drag/drop mouse event will cancel/abort the handler function.
For example in Google Chrome on Windows7:
- drag a tab off the toolbar as if you are going to detach it and before letting go, hit your keyboard Escape key. It should abort the drag and return your tab.