Research: Drag and Drop from Finder
Clone this wiki locally
Mac does not provide a set of simple APIs to handle dropping files from Finder. So we need to find a solution either by updating CEF and/or implementing our own handling of drag-and-drop events. We need to handle at least two main events.
- OnDragEnter event -- need this event to get the file paths of all the dragged files and folders.
- OnDrop -- need this event to open all the dropped files.
- We need CefDragHandler introduced in CEF version 3.1453.1279 so that we can get the file paths of the dragged files and folders.
We have a prototype in Glenn/drag-and-drop branch, but you need to make the following changes before you can test.
- Download CEF version 3.1453.1279 from http://cefbuilds.com/. Make sure you get it from branch 1453.
- Open Gruntfile.js in your brackets-shell repo and update the cef version to 3.1453.1279 (on line 186).
- Delete any intermediate folders that has version number in its name under your
gruntfrom command line in your brackets-shell root folder.