The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

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: 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,


Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed