Bug Tracker

Changes between Version 6 and Version 7 of Ticket #10729, comment 16


Ignore:
Timestamp:
Dec 4, 2011, 2:09:15 PM (11 years ago)
Author:
Cokegod
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10729, comment 16

    v6 v7  
    11I think the drag and drop events are more important than adding 3 lines to the top of `fix`. In my opinion there should be a hooks object for drag and drop, which will copy all the properties from `mouseHooks`, adding the `dataTransfer` property. Then I think all the drag events as names each with a value of the drag and drop hooks object should be added to `fixHooks`.
     2I think the drag and drop events should be added to fixHooks seperatly and not to `jQuery.fn` because they are not entirely supported in all the browsers jQuery supports.
    23
    3 Here is a possible example for what I think that should be done:
    4 {{{
    5 jQuery.event.dndHooks = {
    6     props: jQuery.event.mouseHooks.props.concat( "dataTransfer" ),
    7     filter: jQuery.event.mouseHooks.filter
    8 };
    9 
    10 $.each( ("dragstart dragenter dragover dragleave drag drop dragend").split(" "), function ( i, name ) {
    11     jQuery.event.fixHooks[ name ] = jQuery.event.dndHooks;
    12 });
    13 }}}
     4https://github.com/jquery/jquery/pull/620