cijic / dropdown-check-list

Automatically exported from code.google.com/p/dropdown-check-list
0 stars 0 forks source link

dropdown-check-list not work with rtl direction #60

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago

What steps will reproduce the problem?

1.Set HTML and body dir attribute to 'rtl' 
2.Dropdown not displayed

What is the expected output? What do you see instead?
- Dropdown must be displayed

What version of the product are you using? On what operating system?
dropdown-check-list.0.9 , windows 2003 server , internet explorer 8.0.

Please provide any additional information below.

Original issue reported on code.google.com by Ayman.Mahmoud85@gmail.com on 20 Jan 2010 at 2:25

GoogleCodeExporter commented 8 years ago
Just checked, works with no problems I can see, have a look at the attached 
image.

Original comment by adrian.tosca on 20 Jan 2010 at 5:12

Attachments:

GoogleCodeExporter commented 8 years ago
Reply On Adrian.tosca : when we set the document direction to "rtl" ,there is a 
scroll 
appeared ,and when you move scroll to left and then try to click the dropdown 
it will 
appear shifted to right.Please check the attached image

Original comment by Ayman.Mahmoud85@gmail.com on 23 Jan 2010 at 7:27

Attachments:

GoogleCodeExporter commented 8 years ago
Can you send me a zip with your modified files?
I can't imagine what's the problem. I am not able to test IE8 on win 2003 but I 
can 
hardly imagine that this is the source problem.

Original comment by adrian.tosca on 23 Jan 2010 at 7:37

GoogleCodeExporter commented 8 years ago
I attached the modified files.
I debugged the control and I reached that the problem occurred because the 
offset() function of JQuery 
return wrong offsetleft when the is scroll bar. 

please check this lines

instance.dropWrapper.css({
top: instance.controlWrapper.offset().top + 
instance.controlWrapper.outerHeight() + "px",
left: instance.controlWrapper.offset().left + "px"
}) 

Original comment by Ayman.Mahmoud85@gmail.com on 23 Jan 2010 at 12:21

Attachments:

GoogleCodeExporter commented 8 years ago
I was able to reproduce it. It happens when the scrollbar is scrolled. A quick 
fix 
would be to replace  

left: instance.controlWrapper.offset().left + "px"

with:

left: (instance.controlWrapper.offset().left - 2 * $(window).scrollLeft()) + 
"px"

I found this by trying, so I do not know what is the impact on other browsers, 
but it 
doesn't look very good and certainly needs more testing.

I also discovered another problem this time with DDCL; in rtl mode it needs to 
align 
the drop down container to the right of the input not to the left. This problem 
is 
visible when the drop down is bigger than the input (width option is used).

Original comment by adrian.tosca on 24 Jan 2010 at 8:25

GoogleCodeExporter commented 8 years ago
Btw, any idea how to detect if the rtl direction is used from jquery?

Original comment by adrian.tosca on 24 Jan 2010 at 8:27

GoogleCodeExporter commented 8 years ago
thanks for your support.I will try your modification.
About rtl , I think it is better to make it as option that passed to 
dropdownchecklist 
function.

Original comment by Ayman.Mahmoud85@gmail.com on 24 Jan 2010 at 9:06

GoogleCodeExporter commented 8 years ago
should align the drop down container to the right of the input not to the left 
in rtl 
mode

Original comment by adrian.tosca on 25 Feb 2010 at 7:09

GoogleCodeExporter commented 8 years ago
Issue 216 has been merged into this issue.

Original comment by womohun...@ittrium.com on 24 Oct 2011 at 2:26