[ 3 posts ]

Guido Buecker

  • Username: VanilleGrobi
  • Joined: Mon Jul 12, 2010 2:43 am
  • Posts: 11
  • Offline
  • Profile
Tags:

start drag with/on <a>-tag

Post Posted: Thu Jul 15, 2010 8:28 am
+0-
If a draggable object contains an <a>-tag one can't start dragging the object on the area occupied by the anchor.

Is there a simple way around this ?

Dav Glass

  • Username: davglass
  • Joined: Thu Aug 28, 2008 9:28 am
  • Posts: 2088
  • Location: Marion, IL, US
  • Twitter: davglass
  • GitHub: davglass
  • Gists: davglass
  • IRC: davglass
  • Offline
  • Profile
Tags:

Re: start drag with/on <a>-tag

Post Posted: Thu Jul 15, 2010 8:30 am
+0-
By default DD will not drag an Anchor, but you can use the removeInvalidHandleType method on the DD instance to remove the A as an invalid handle.

http://developer.yahoo.com/yui/docs/YAH ... HandleType

Code:
var dd = new YAHOO.util.DD();
dd.removeInvalidHandleType('a');


That should take care of it..

Guido Buecker

  • Username: VanilleGrobi
  • Joined: Mon Jul 12, 2010 2:43 am
  • Posts: 11
  • Offline
  • Profile

Re: start drag with/on <a>-tag

Post Posted: Thu Jul 15, 2010 8:47 am
+0-
Thanks for quick reply :)

That works so far but unfortunately it also executes the href immediately which isn't quiet what i would expect.
If the mouse is released after a drag operation it shouldn't resolve to a click for the a-tag. Would that be possible?
  [ 3 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum