File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 22 <!-- just for tests -->
33 <video src =" #" style =" background-color : aqua " > TEST </video >
44
5- <FileInput :state =" state" :global-drop-zone =" true " >
5+ <FileInput :state =" state" :global-drop-zone =" false " >
66<!-- <FileInputSelectedInfo :state="state"/>-->
77 </FileInput >
88
Original file line number Diff line number Diff line change 11{
22 "name" : " @alttiri/vue-file-input" ,
3- "version" : " 1.5.0 -20240819" ,
3+ "version" : " 1.5.1 -20240819" ,
44 "type" : " module" ,
55 "description" : " Vue.js file input with Drag and Drop support." ,
66 "homepage" : " https://github.com/alttiri/vue-file-input" ,
Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ function onDragOver(event: DragEvent) {
117117}
118118function onDragEnter(event : DragEvent ) {
119119 stopEvent (event );
120- if (event .relatedTarget !== null ) {
120+ if (globalDropZone . value && event .relatedTarget !== null ) {
121121 return ;
122122 }
123123 if (! dropHover .value ) {
@@ -129,7 +129,11 @@ function onDragEnter(event: DragEvent) {
129129}
130130function onDragLeave(event : DragEvent ) {
131131 stopEvent (event );
132- if (event .relatedTarget !== null ) {
132+ if (globalDropZone .value ) {
133+ if (event .relatedTarget !== null ) {
134+ return ;
135+ }
136+ } else if (dropHover .value && dropZone .value ?.contains (event .relatedTarget as Node )) {
133137 return ;
134138 }
135139 dropHover .value = false ;
You can’t perform that action at this time.
0 commit comments