Interprocess Dragging is a Drag (Sometimes)
September 23rd, 2005My “Apple Bug Friday” entries today are both related to a really cool feature of Mac OS X: process switching while dragging. As the operating system has evolved, dragging in general has improved. One of my favorite improvements is that while dragging you can now invoke the Cmd-Tab process switcher keys to bring another application to the front. So instead of performing that tedious “line up” to prepare two applications for a drag, you can simply start in one application with the knowledge that you’ll be able to navigate to the other app before your finger releases the dragged item. I often use this, for instance, when sending attachments through Mail:
- Locate the attachable files in the Finder.
- Select them and start a drag.
- Cmd-Tab to activate Mail.
- Cmd-N to create a new mail message.
- Drop the drag into the content of the new message!
It’s just … downright amazing that you can do this! So where are the bugs? There are two major shortcomings I’ve observed in Apple’s overall fantastic implementation:
Radar 4270813 – Can’t cancel drag outside of initiating application
Normally when you start a drag and end up with second thoughts, you can rely on the effectiveness of the escape key to reject the drag without any worries that you might be accidentally moving a file or object to some new, unfathomable location. For some reason this mechanism simply stops working once you’ve switched to an application other than the app that originated the drag. So, assuming I want to safely cancel a drag that I’ve started and then switched applications for, I have to now navigate back to the original application just to hit the escape key and cancel the drag!
For instance:
- Navigate to the Finder and begin dragging a file.
- Cmd-Tab to another app, say, Mail.
- Hit the escape key. No effect.
- Cmd-Tab back to Finder.
- Hit the escape key. Drag cancelled!
What a drag! The cancel key should kill the drag safely regardless of where the user has wandered. This is especially problematic if, for some reason, your short-term memory fails you and you can’t remember which application originated the drag.
Radar 4270824 – Can’t completely switch back to drag-originating app
So, once you switch back to the originating app you can hit cancel and breathe a sigh of relief. The problem is, switching back to the originating app while the drag is still in place produces another bug, which is that although the originating app is now “front-most”, none of its IU (not even its menu bar) has yet been brought to the front. So it’s not only confusing, but if you decided you wanted to drag to the originating app after all, you’re out of luck. You’ll have to cancel the drag and start over.
Illustration:
- Initiate a drag in the Finder by selecting and dragging a file from a folder list.
- While keeping the drag alive with the mouse, Cmd-Tab to another application, say Safari.
- Decide you don’t want to drag to Safari after all, and Cmd-Tab back to the Finder.
Result: Although the Finder is somewhat active, none of its windows have come forward, and the menu bar still says “Safari.”
Workaround: If you can glimpse any part of a Finder window’s content, then dragging the item to this content and “moving it around” seems to trigger full activation of the Finder. I imagine it’s similar for other applications.
What a drag! Cmd-Tabbing to an application should always bring it forward.