Amir Mirkamali

امیر میرکمالی

RadFormDecorator Problem with RTL Pages and checkboxes

The problem is that when clicking on the checkbox/radiobutton, then the vertical scrollbar jumps to the top!

This could happen in some scenarios because of the way RadFormDecorator styles checkboxes. When RadFormDecorator is used, the real checkboxes are hidden outside of the viewport. When the decorated checkbox is clicked however, browsers try to focus the real checkbox, hence the "jumping". To avoid that, the only thing that you usually need to do is to set position:relative to the parent container.

In this case however, because of the RTL mode, the approach is a bit different and need to add the following CSS the page:

   position: static !important;
   float: right;
   outline: 0;
   width: 0;
   height: 0;
   margin-top: -5px;
   FILTER: alpha(opacity=0)
   -moz-opacity: 0
   opacity: 0