Opened 11 years ago

Closed 11 years ago

#7326 closed defect (fixed)

dojox.grid: padding on body causes column resizing to jump around

Reported by: Nathan Toone Owned by: Nathan Toone
Priority: high Milestone: 1.2
Component: DnD Version: 1.1.1
Keywords: Cc: Bryan Forbes, Eugene Lazutkin
Blocked By: Blocking:

Description

When there is padding on the body element, the column resizing jumps around by that amount.

Attachments (1)

dndpadding.patch (1.0 KB) - added by Nathan Toone 11 years ago.
Patch which removes the body's padding/margin when calculating the move distance.

Download all attachments as: .zip

Change History (3)

comment:1 Changed 11 years ago by Nathan Toone

Cc: Eugene Lazutkin added
Component: DojoX GridDnD

This appears to be a dojo.dnd issue. What it looks like is happening is this:

the event.pageX/pageY that is used to calculate the initial margin box in the mover's constructor includes the body's padding - it's the *real* x/y value in the page. However, in onFirstMove, setting the node's position to "absolute" and then using marginBox on it does not include the body's padding (also correctly). We need to subtract this difference in onFirstMove.

Changed 11 years ago by Nathan Toone

Attachment: dndpadding.patch added

Patch which removes the body's padding/margin when calculating the move distance.

comment:2 Changed 11 years ago by Nathan Toone

Resolution: fixed
Status: newclosed

(In [14645]) Fixes #7326 - account for padding and margin on the body when calculating position for onFirstMove

Note: See TracTickets for help on using tickets.