Thomas Ummels is a freelance Javascript developer who created the web based Gantt chart tool www.tomsplanner.com. A Gantt chart application to create and share project schedules, project plannings and project timlines. Easier than MS Project and faster than Excel. No more messy Excel spreadsheets with tom'splanner Gantt chart templates. The Gantt chart software is almost entirely written in Javascript using the latest Front End technolgies including Jquery and ecluding Ext-js. Tom'splanner enables you to share your Gantt charts and project schedules online.

Freelance Front-End/Javascript | Creator of Gantt Chart Software Tom'splanner

Friday, July 4, 2008

Avoid default drag and drop behaviour in FF3

Fierfox 3 offers the user the possibility to drag and drop images around on the pages by default. Which is nice.... I guess. But this behaviour can mix with drag and drop routines written in javascript. So how to cancel the default drag & drop in Firefox 3?

document.addEventListener("draggesture", function(event){event.stopPropagation()},true);

or if you are using jquery: $(document).bind("draggesture",function(){return false})

I haven't seen any mention of this on the net so far so I thought is was worth mentioning it.

(For IE use $(document).bind("drag",function(){return false}))

Labels: , , , , , , ,


 
Thomas Ummels, freelancer and senior Javascript developer. Creator of the Gantt chart software www.tomsplanner.com. A Gantt chart tool that anables you to share project timelines and Gantt charts online. An alternative for Excel templates and/or MS Project. It is faster than Excel. Gantt chart templates enable you to create Project plans and schedules fast and easy. The Gantt chart tool is written in Javascript using the latest Front End technolgies including Jquery and ecluding Ext-js. Although Thomas Ummels has extensive experience using the Extjs framework. Tom'splanner enables you to share your Gant charts and project schedules online.