Opened 3 years ago

Last modified 2 years ago

#18987 new defect

Inconsistent drag and drop behavior in different browsers for dijit form input elements with disabled property set to true

Reported by: erotavlas Owned by:
Priority: high Milestone: 1.14
Component: DnD Version: 1.10.6
Keywords: Cc:
Blocked By: Blocking:

Description

Given a custom widget whose template looks like this

<div data-dojo-attach-point="formelement">

<input type="text"data-dojo-attach-point="theInput"

data-dojo-type="dijit/form/ValidationTextBox" data-dojo-props="trim:false, propercase:false, disabled:true" />

</div>

Then using "dojo/dnd/move" to enable drag and drop on a custom widget like this

initializeDnd: function (object) {

var that = this;

expecting the widget domNode here this is the node you want to make draggable this.thisWidgetDomNode = object;

the dijit widget for the form element this.thisWidget = dijit.getEnclosingWidget(this.thisWidgetDomNode);

this.dndObject = new Move.parentConstrainedMoveable(this.thisWidgetDomNode, {

area: "content", within: true, mover: this.StepMover?,

})

},

The custom widget appears to be draggable using Chrome and IE 11, but not in Edge and FireFox? browsers.

On further testing I noticed however that if there is a padding around the containing div of the custom widget (surrounding the input), then if drag starts anywhere outside the input element, in the padding area, then DnD responds and the whole widget is moveable.

However when the initial mouse click is anywhere on the input element, then the element is not draggable.

This problem occurs only when the input element property 'disabled' is set to true. and only for browsers FireFox? and Microsoft Edge.

In Chrome and IE11, the disabled property has no effect on drag and drop functionality and the widget is moveable no matter where initial mouse click occurs inside the custom widget.

Initially I wanted to be able to drag and drop the disabled input widgets, however after further research i discovered that disabled form inputs are not handled by any events.

Change History (2)

comment:1 Changed 3 years ago by dylan

Milestone: tbd1.12.3
Priority: undecidedhigh

comment:2 Changed 2 years ago by dylan

Milestone: 1.12.31.14
Note: See TracTickets for help on using tickets.