Opened 6 years ago

Closed 5 years ago

#16805 closed defect (duplicate)

Dnd: replace event.stop with preventDefault in the dojo/dnd/Selector onMouseDown function

Reported by: Ben McKernan Owned by: Eugene Lazutkin
Priority: undecided Milestone: tbd
Component: DnD Version: 1.8.3
Keywords: Cc:
Blocked By: Blocking:

Description

In 1.8.3 dojo/dnd/Selector the onMouseDown function calls event.stop(e) and in 1.9.0a2 it calls both e.stopPropagation() and e.preventDefault() instead.

It appears that this is in order to prevent the browser from selecting text when the user drags. But this prevents using the event mousedown higher up in the DOM hierarchy and should therefore be replaced with just e.preventDefault(), which prevents the text selection, but does not cancel event bubbling.

Change History (2)

comment:1 Changed 6 years ago by bill

Note that I changed the DnD code to call e.stopPropagation() and e.preventDefault() instead of event.stop(), because event.stop() is deprecated, but I wasn't trying to imply that both calls were necessary. I was just doing a direct replacement.

comment:2 Changed 5 years ago by bill

Resolution: duplicate
Status: newclosed

Duplicate of #16157.

Note: See TracTickets for help on using tickets.