javascript - Drag and Drop Angular File Upload with Relatively Positioned Elements -


I have a problem with the filename upload, my drop target is being used with relative position elements 100% Width and height, is located exactly if you drag the file to any non-relatively located element, the overlay looks ok and everything works even though if you drag it to a relatively position then this drag event is not registered. Does. The reason for this is that the relative elements are visible at the top of the dropieria.

I have tried to put a drop-target to the z-index, and drag and drop works great, but then I can not click anything

HTML

  & lt; Html & gt; & Lt; Top & gt; ... & lt; / Head & gt; & Lt; Body & gt; & Lt; Div id = "dropArea" & gt; ... & lt; / Div & gt; & Lt; Div id = "sitecontent" & gt; & Lt; Div class = "row" & gt; & Lt ;! - This element fails by dragging, because it is relatively condition - & gt; & Lt; Div class = "col-md-12" & gt; ... & lt; / Div & gt; & Lt; Div & gt; ... & lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt;   

css

  #dropArea {status: absolute; Width: 100%; Height: 100%; Top: 0; Left: 0; }   

Is there any way to implement z-index in the drop-area but still have permission to pass the click?

I resolved it by wrapping the contents of the entire page in the drop area. & lt; Html & gt; & Lt; Top & gt; ... & lt; / Head & gt; & Lt; Body & gt; & Lt; Div id = "dropArea" class = "dropArea" ng-file-drop = "select onfile ($ files)" ng-file-drag-over-class = "file added" & gt; & Lt; Div id = "drop-content-container" & gt; & Lt; Div id = "drop-content" & gt; & Lt; Img src = "img / app / files-upload -dd.png" & gt; & Lt; H1 & gt; Drop files here! & Lt; / H1> & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "page-content" & gt; ... & lt; / Div & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt;

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -