Opened 6 years ago

Closed 4 years ago

#17730 closed defect (patchwelcome)

dojo/window#getBox().l wrong on RTL page w/horizontal scroll bar

Reported by: bill Owned by:
Priority: undecided Milestone: 1.13
Component: Core Version: 1.9.2
Keywords: Cc:
Blocked By: Blocking:

Description

getBox() returns an object like {w: 1000, h: 100, l: 50, t: 50} . Given the name, it's natural to assume the l property represents the distance of the viewport from the left side of the document.

But when dir=rtl, dojo/window#getBox().l does not give this value. That's because (at least on chrome) when the window is scrolled all the way to the right, window.scrollX is 0. If you scroll to the left window.scrollX becomes negative. getBox() is not accounting for this.

Attachments (1)

getBox.html (732 bytes) - added by bill 6 years ago.
Test case, scroll to left and right then press button, and check console. Assumes your browser window is <2000px wide.

Download all attachments as: .zip

Change History (2)

Changed 6 years ago by bill

Attachment: getBox.html added

Test case, scroll to left and right then press button, and check console. Assumes your browser window is <2000px wide.

comment:1 Changed 4 years ago by dylan

Milestone: tbd1.12
Resolution: patchwelcome
Status: newclosed

Given that no one has shown interest in creating a patch in more than a year, I'm closing this as patchwelcome. Please let us know if you would like to get involved in helping make this change to Dojo!

Note: See TracTickets for help on using tickets.