The floating RadDock control (its property DockMode
is set to Floating
) does not have functionality that ensures it is always in the boundaries of the screen, so you need to configure its coordinates manually in such a scenario.
In your case I am not sure what is the exact difficulty you encountered. First you mentioned that the dock goes beyond the bottom border of the browser when its content is higher, then you added that the bottom of the dock is fixed and its top can get higher and possibly go beyond the top of the viewport of the browser.
Also, the script you posted will position the dock outside of the boundaries of the browser screen if the height of the body element is small, in case the dock is floating.
I cannot provide a concrete suggestion, because I do not have enough information about the configuration of the dock and the layout of the page, nevertheless you could add a check that ensures the value set as parameter to the set_top
method is not negative. If this does not help, I will need more detailed information about what actually happens with the dock and a fully runnable sample page that isolates the problematic scenario.
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.