HomeMusing Studio

Prevent dropping of external files onto editor

Description

Prevent dropping of external files onto editor

We now detect whether a file is being dropped by a user (by checking event.dataTransfer.files.length) and prevent the remaining drop behavior if this is the case. Otherwise, drop happens like normal (so a user can still drop text into the editor, or even an image that has been uploaded already via normal means and rendered in the editor).

Details

Provenance
Darius Kazemi <darius@meedan.com>Authored on Mar 3 2022, 6:25 PM
Parents
rWF46bb8e65a12c: Add security policy
Branches
Unknown
Tags
Unknown
References
refs/pull/537/head

Event Timeline

Darius Kazemi <darius@meedan.com> committed rWFdd88083b2a6d: Prevent dropping of external files onto editor (authored by Darius Kazemi <darius@meedan.com>).Mar 3 2022, 6:25 PM