backport fix for dragging in Firefox