Support text/uri-list MIME type for onDropText
This allows for drag-and-dropping links contained in HTML anchor elements, if there's no text data available.
Rationale: if using drag-drop in a place where URLs are expected, it's very convenient for dropping links to work not only with outright strings, but also with anchor tags which are common on websites – something like: <a href="https://example.com"><img src="bar"></a>. In this case .getData('text') is empty BUT .getData('text/uri-list') does have useful data – 'https://example.com' – and we should make use of this data.
Before, the user could only right-click, click "Copy link address", and somehow use that copied text in the target app. With this tiny change to drag-drop, the user can simply drag the anchor element to the target app – and that's it. Significant improvement to the user experience.
Please do release new version if this is merged.
Bump?
What browser are you using? I just tested the version on master and it seems to handle dropped anchor links just fine without the changes in this PR.
Electron, specifically https://github.com/webtorrent/webtorrent-desktop
@Twixes Can you confirm that this issue still exists on the latest version of electron, which I believe we're using on webtorrent-desktop on the master branch?
Let me know if latest Electron still has this issue.
I just tried on webtorrent-desktop master and unfortunately still requires this PR to recognize <a href> elements that don't contain text.
Bump?
I'm sorry but this still doesn't quite work in the WebTorrent app! Perhaps we could get a solution in?