HTML drag event does not fire in firefox

后端 未结 3 798
攒了一身酷
攒了一身酷 2021-01-17 20:22

I have a table on which I need to implement draggable header columns. I implemented it using Chrome as my browser, and everything worked fine. When I tested it in Firefox (1

3条回答
  •  南笙
    南笙 (楼主)
    2021-01-17 21:00

    Firefox requires 'something' (that we call 'init' here) to be set in dragstart event to initialize the rest of drag events to occur.

    This is probably because all of the DOM elements are draggable="true" by default in XUL. (reference: https://bugzilla.mozilla.org/show_bug.cgi?id=646823#c4)

    Example:

    Drag me

    Chrome doesn't require such 'initialization'.

提交回复
热议问题