javascript - Problems with bubbling event on dragleave -
i have working example dragenter
, dragleave
events highlight area file should dropped. example works correctly.
right if add single <span>
inside of dragenter region, highlighting not work correctly anymore (when hover image on top of text - highlighting disappears). see dragleave
called multiple times.
all changed substituted drop files here
<span>drop files here</span>
also there knockout code there, believe has nothing bug. understand problem event bubbling,
e.stoppropagation(); e.preventdefault(); return false;
does not help. idea how make work dom elements indside?
p.s. simplified example , looks not able make (i thinking way solve through js, , appears way described it possible solve css well). sorry confusion. example looks more this. not text inside of dropable element, when drop something, elements appears there. these elements clickable.
the problem malk's solution :after
element stays on top of these clickable elements , making them unclickable.
i think malk's answer valid. using overlay or mask sit above drop zone , it's children when drag on , drop. prevents issue experiencing span
i've created working fiddle newest example.
Comments
Post a Comment