kPasteboardTypeFileURLPromise broken: Dropped files are not selected
| Originator: | motownavi | ||
| Number: | rdar://14943865 | Date Originated: | 09-Sep-2013 |
| Status: | Open | Resolved: | |
| Product: | Mac OS X | Product Version: | 10.8 |
| Classification: | UI/Usability | Reproducible: | Always |
NSFilesPromisePboardType has a note in the documentation: > On OS X v10.6 and later, use (NSString *)kPasteboardTypeFileURLPromise instead. In Google Chrome 29 I switched from NSFilesPromisePboardType to kPasteboardTypeFileURLPromise. The complaints about how drag-and-drop broke came pouring in, and I had to revert. There are four issues I am reporting; this is one of them. I will update this radar with links to the other three when I am done filing them all. --- When kPasteboardTypeFileURLPromise is used to do drag-and-drop, dropped files aren't selected. Reproduction: - Drag a promised file to a Finder window and drop it there Expected: - The newly created file is selected, like it was when NSFilesPromisePboardType was used Actual: - The newly created file is not selected Workaround: It is possible to use an AppleEvent to select the new file. The function that I wrote took 80 lines of code. The problem is that the workaround isn't perfect; it brings the window to the front of the Finder's window list, whereas using NSFilesPromisePboardType selected the item but didn't touch the window list order. kPasteboardTypeFileURLPromise needs to have exactly the same file selection behavior as NSFilesPromisePboardType.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Here's a slightly dirty workaround I use:
https://gist.github.com/Wevah/10145527
(I wish com.apple.pastelocation was documented somewhere.)