File tree Expand file tree Collapse file tree 3 files changed +14
-10
lines changed Expand file tree Collapse file tree 3 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -3,9 +3,7 @@ if (document.getElementById('vue-dropZoneDemo')) {
33 el : '#vue-dropZoneDemo' ,
44 methods : {
55 onDrop : function ( evt ) {
6- console . log ( '@drop' ) ;
76 // Prevent default behavior (Prevent file from being opened)
8- //evt.preventDefault();
97 if ( evt . dataTransfer . items ) {
108 // Use DataTransferItemList interface to access the file(s)
119 for ( var i = 0 ; i < evt . dataTransfer . items . length ; i ++ ) {
@@ -16,10 +14,8 @@ if (document.getElementById('vue-dropZoneDemo')) {
1614 }
1715 }
1816 } else {
19- // Use DataTransfer interface to access the file(s)
20- for ( var i = 0 ; i < evt . dataTransfer . files . length ; i ++ ) {
21- alert ( 'file drop successful! ' + evt . dataTransfer . files [ i ] . name ) ;
22- }
17+ // TO DO: find solution, alert currently not working in ie11
18+ alert ( 'Cannot detect dropped files in this browser.' ) ;
2319 }
2420 } ,
2521 } ,
Original file line number Diff line number Diff line change 99
1010 < section >
1111 < p >
12- The custom < code > {{page.title}}</ code > element fill in here .
12+ The custom < code > {{page.title}}</ code > element provides an area where a user can drop files .
1313 </ p >
1414
1515 < dl class ="hxBox-md metadata hxList ">
2323 </ div >
2424 < div >
2525 < dt > Events</ dt >
26- < dd > < em > none</ em > </ dd >
26+ < dd >
27+ Any of the following:
28+ < ul >
29+ < li >
30+ < code > drop</ code > - See MDN's < a href ="https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API/File_drag_and_drop "
31+ target ="_blank "> "File Drag and Drop"</ a > for more information.
32+ </ li >
33+ </ ul >
34+ </ dd >
2735 </ div >
2836 </ dl >
2937 </ section >
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ export class HXDropZoneElement extends HXElement {
7676
7777 // #4 this gets called when the dragged item leaves the zone (leaves to a child element or zone altogether)
7878 /** @private */
79- _onDragLeave ( evt ) {
79+ _onDragLeave ( ) {
8080 //evt.preventDefault();
8181 window . clearTimeout ( this . _zoneDragLeaveTimeout ) ;
8282 // callback must be an arrow function to preserve "this"
@@ -102,7 +102,7 @@ export class HXDropZoneElement extends HXElement {
102102 }
103103
104104 /** @private */
105- _onDrop ( evt ) {
105+ _onDrop ( ) {
106106 this . removeAttribute ( 'drag' ) ;
107107 this . _isDragging = false ;
108108 this . _isZoneDragging = false ;
You can’t perform that action at this time.
0 commit comments