1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-11-16 07:17:21 +00:00

Fix: issues with drag and drop in Chrome 96 (#6261)

* fix: issues with drag and drop (false positives in detection for files being dropped) introduced by Chrome 96

* fix: call dragEventContainsType method more consistently.

* fix: call dragEventContainsType method more consistently.
This commit is contained in:
Saq Imtiaz
2021-11-21 21:48:16 +01:00
committed by GitHub
parent 0664895670
commit 7fcc84156e
3 changed files with 11 additions and 4 deletions

View File

@@ -198,7 +198,8 @@ DropZoneWidget.prototype.handleDropEvent = function(event) {
this.resetState();
// Import any files in the drop
var numFiles = 0;
if(dataTransfer.files) {
// If we have type text/vnd.tiddlywiki then skip trying to import files
if(dataTransfer.files && !$tw.utils.dragEventContainsType(event,"text/vnd.tiddler")) {
numFiles = this.wiki.readFiles(dataTransfer.files,{
callback: readFileCallback,
deserializer: this.dropzoneDeserializer