Completed
Last Updated: 11 Aug 2021 19:00 by ADMIN
Yousef Salimpour
Created on: 10 Jun 2013 11:11
Category: ColorPicker
Type: Bug Report
0
FIX Unwanted scrollbar using ColorPicker in a RTL page
ColorPicker Causes unwanted scrollbar in page if It is used in a RTL page.
It's because of setting palleteWrapper.style.left to -9999px in hidePalette function in RadColorPicker.js.
It can be fixed if you set palleteWrapper.style.left to something like 0 or 50%. It will be out of page due to -9999px as top value anyway.
1 comment
ADMIN
Rumen
Posted on: 11 Aug 2021 19:00

Hi Yousef,

You can easily override the hidePalette function and fix the problem:

 

        <telerik:RadColorPicker ID="RadColorPicker1" runat="server"  ShowIcon="true"></telerik:RadColorPicker>
        <script>
            Telerik.Web.UI.RadColorPicker.prototype.hidePalette = function() {
                /// <summary>
                /// Hides the palette
                /// </summary>
                
                var popupBehavior = this._popupBehavior;
                if (popupBehavior) {
                    var paletteWrapper = this._paletteWrapperElement;
                    paletteWrapper.style.top = "-9999px";
                    paletteWrapper.style.left = "0";
                    popupBehavior.hide();
                }

                this._paletteDisplayed = false;
            }
        </script>

 

 

Regards,
Rumen
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.