Opened 6 years ago

Closed 3 years ago

#16728 closed defect (patchwelcome)

ResizeHandle RTL mode broken and doesn't affect 'left' property

Reported by: Nick Fenwick Owned by:
Priority: undecided Milestone: 1.13
Component: DojoX Layout Version: 1.8.3
Keywords: Cc:
Blocked By: Blocking:


dojox/layout/ResizeHandle can operate in RTL mode but does not try to modify the 'left' property of the node. Shrinking an element by dragging the bottom left corner should move that bottom left corner, not just change the width/height of the element being resized.

I'm working on this, will submit a patch in due course.

Attachments (1)

16728.patch (4.7 KB) - added by Nick Fenwick 6 years ago.
Partial fix - Patch to ResizeHandle? and tests file.

Download all attachments as: .zip

Change History (4)

Changed 6 years ago by Nick Fenwick

Attachment: 16728.patch added

Partial fix - Patch to ResizeHandle? and tests file.

comment:1 Changed 6 years ago by Nick Fenwick

Attached a partial fix. The normal bottom-right case still works fine, and with an absolutely positioned ('floating') element, you can now use the bottom left corner in 'right-to-left' mode to resize too.

Two points, one a pretty serious problem and the other more of a question.

  1. I'd appreciate some advice on one problem. The <body> tag in the tests file is using padding:20px from dijitTests.css, and this makes the RTL case 'jump' by 20px each time. If you manually remove that 20px padding, it resizes normally. I'm not sure where to make the change to get the resize to happen properly.
  2. Additionally it would be nice to support dual resize handles, but this is not possible with default dijit styles because the 'bottom left' mode relies on the parent element having class="dijitRtl", while the normal mode relies on this class not being there. You can dummy the rtl styles and apply the class manually but this seems quite a hack. Is there a more elegant way of achieving this? is a sandbox example of this code with the body padding removed and double resize handles to demonstrate each of these points.

comment:2 Changed 6 years ago by bill

I'm not sure how to fix for the 20px. Actually, I didn't see any issue when trying your patch on Chrome/mac.

It sounds like the CSS shouldn't be using a dijitRtl selector. I don't think it's really a question of RTL vs. LTR, but rather it should just be some flag about where the handle is. dijitHandleLeft vs. dijitHandleRight, or something like that. Incidentally, owadays dijit uses selectors like dijitTextBoxRtl etc., i.e. putting the RTL flag on the widget itself.

comment:3 Changed 3 years ago by dylan

Milestone: tbd1.12
Resolution: patchwelcome
Status: newclosed

Given that no one has shown interest in creating a patch in the past 2+ years, I'm closing this as patchwelcome.

Note: See TracTickets for help on using tickets.