Completed
Last Updated: 13 Aug 2021 12:41 by ADMIN
Release Q3 2014
ADMIN
Danail Vasilev
Created on: 30 Jun 2014 11:42
Category: Dock
Type: Bug Report
1
FIX A JavaScript error is thrown when a RadDock with RenderMode=Lightweight and DefaultCommands=None is dragged
For the time being you can either declare some command or place the following JavaScript workaround below the RadDock's declaration:
		<telerik:RadDockZone ID="RadDockZone1" runat="server" Height="100%" MinWidth="50">
			<telerik:RadDock ID="RadDock1" runat="server" RenderMode="Lightweight" Title="title"
				DefaultCommands="None" DockHandle="TitleBar" DockMode="Docked">
				<ContentTemplate>
					<div>
						Content...
					</div>
				</ContentTemplate>
			</telerik:RadDock>
		</telerik:RadDockZone>
		<script>
			Telerik.Web.UI.Dock.LightweightView.prototype._sizeTitleElement = function () {
				var titleElem = this.get_titleElement(),
					titleBarElem = this.get_titleBar(),
					commandsElem = this.get_commandsContainer();
				if (commandsElem == undefined) {
					titleElem.style.width = Math.max(0, parseInt(titleBarElem.clientWidth)) + "px";
				}
				else {
					titleElem.style.width = Math.max(0, parseInt(titleBarElem.clientWidth) - parseInt(commandsElem.clientWidth)) + "px";
				}
				
			}
		</script>
1 comment
Andre Light
Posted on: 30 Jun 2014 15:58
This issue prevents me from using the highly-touted auto render mode.  Apparently, it doesn't work in all instances, so I'm looking forward to this being resolved.  Thanks for the workaround.