Opened 12 years ago

Closed 12 years ago

Last modified 9 years ago

#4349 closed defect (fixed)

dijit.form.HorizontalSlider broken in RTL mode

Reported by: dante Owned by: Adam Peller
Priority: high Milestone: 1.1
Component: Dijit - Form Version: 0.9
Keywords: bidi Cc: hwcdl@…, Douglas Hays
Blocked By: Blocking:

Description

as seen in the test case: http://archive.dojotoolkit.org/nightly/checkout/dijit/tests/form/test_Slider.html?dir=rtl

the handle listens in the wrong direction (eg: click and hold handle, drag right to increment, though you would expect it to decrease.) the reversed sliderbar goes in the correct direction.

vertical slider is unaffected by right-to-left swapping, obviously.

Attachments (2)

dijit-bidi-fix-slider-10425.patch (3.7 KB) - added by Adam Peller 12 years ago.
Patch from Justin Yin (IBM, CCLA) Slider and this patch run perfectly in IE 6/7. But in Firefox, the vertical ruler and the ruler's label are not aligned. The original code also has a similar defect in LTR direction. I still cannot figure out how to solve this.
dijit-bidi-fix-theme-slider-tabcontainer-10425.patch (4.1 KB) - added by Adam Peller 12 years ago.
from Justin (IBM): actually it is an IE issue in the test HTML file but not in the Tooltip's code. IE has a unique "layout" issue, and especially in RTL, it often causes incorrect values in position properties like offsetLeft. A hack to solve this is adding a style -- "zoom:1". So if we just add this style to the problematical text element in the test file, the Tooltip will be displayed at the right position.

Download all attachments as: .zip

Change History (15)

comment:1 Changed 12 years ago by Adam Peller

Cc: yinjun@… added
Keywords: bidi added
Milestone: 1.0

looks like some js positioning going on? need to adjust logic accordingly.

comment:2 Changed 12 years ago by Adam Peller

See #4370. Apply partial fixes and push back to 1.1?

Changed 12 years ago by Adam Peller

Patch from Justin Yin (IBM, CCLA) Slider and this patch run perfectly in IE 6/7. But in Firefox, the vertical ruler and the ruler's label are not aligned. The original code also has a similar defect in LTR direction. I still cannot figure out how to solve this.

Changed 12 years ago by Adam Peller

from Justin (IBM): actually it is an IE issue in the test HTML file but not in the Tooltip's code. IE has a unique "layout" issue, and especially in RTL, it often causes incorrect values in position properties like offsetLeft. A hack to solve this is adding a style -- "zoom:1". So if we just add this style to the problematical text element in the test file, the Tooltip will be displayed at the right position.

comment:3 Changed 12 years ago by Adam Peller

Cc: hwcdl@… Douglas Hays added; yinjun@… removed

comment:4 Changed 12 years ago by Adam Peller

Owner: changed from Adam Peller to Douglas Hays

Doug, please review and apply these patches and transfer back to me. Thanks.

comment:5 Changed 12 years ago by Douglas Hays

Status: newassigned

comment:6 Changed 12 years ago by Douglas Hays

Resolution: fixed
Status: assignedclosed

(In [10705]) Fixes #4349. Proxy commit for IBM Shanghai. Instrument Slider for right-to-left languages.

comment:7 Changed 12 years ago by Douglas Hays

Cc: Adam Peller added; Douglas Hays removed

comment:8 Changed 12 years ago by Adam Peller

Milestone: 1.01.1
Resolution: fixed
Status: closedreopened

ok, we're in better shape, but some issues remain, like the initial slider position is wrong in the test page (should be 10%, but instead is off the edge > 100%)

oh, and the button graphics need to be reversed in CSS (see last example in test_Slider.html)

comment:9 Changed 12 years ago by Adam Peller

Cc: Douglas Hays added; Adam Peller removed
Owner: changed from Douglas Hays to Adam Peller
Status: reopenednew

comment:10 Changed 12 years ago by Adam Peller

plus, not sure if it's related, but the vertical ruler ticks in the themetester example are b0rken in rtl. might have to do with the layout of that tab.

comment:11 Changed 12 years ago by Adam Peller

Resolution: fixed
Status: newclosed

(In [11523]) Fix Slider and ComboBox? bidi problems. Fixes #4349

comment:12 Changed 12 years ago by Adam Peller

(In [11539]) Forgot to qualify dropdown/combobutton rules with rtl. Refs #4349

comment:13 Changed 9 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.