Grow your CSS skills. Land your dream job.

Overriding default drag and drop behaviour

  • # September 20, 2009 at 6:55 am

    Hi folks,

    On my site I allow users to include certain XHTML tags in their comments. Open the post titled Sticky footers and scroll down to the accepted tags pane (just under "Leave a reply…") to see what I’ve done to make this process simple.

    Just a few minutes ago I accidentally dragged one of the tags into the comment field, and it inserted the link’s URL: http://davidchambersdesign.com/sticky-footers/#. Some users may expect this to insert the appropriate tag, so I would like to have this happen if possible.

    Is there any way to override default browser behaviour in this respect? Any suggestions proposed need not work for all users, so making use of HTML5′s drag and drop capabilities is an option. The pane already requires JavaScript, so a JavaScript solution would be fine also.

    I may be on a hiding to nothing here, but if you have any thoughts please let me know.

    Many thanks,

    David

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".