Thursday, 15 May 2014

javascript - How to HTML5-drag an element that has a link in it -


I have an element inside which there is a link and I want to be able to pull it out. The element looks like this:

  & lt; Div draggable = "true" & gt; & Lt; A href = "#" & gt; 122/1 & lt; / A & gt; & Lt; / Div & gt;  

Dragging itself works fine, meaning that all possible events are removed. However, when the user clicks on the link to drag, the element will not pull. In Safari and Chrome, I see a gray box with rounded corners in which there is a text and href link, so it seems that I am just dragging the link and not the element. See this Bela :. While clicking on the link to drag, div still ignores its dragstart event, but it is not dragged.

How can I make the version with the link properly displayed while dragging?


No comments:

Post a Comment