Completed
Last Updated: 17 Apr 2014 11:28 by ADMIN
ADMIN
Ianko
Created on: 11 Apr 2014 11:37
Category: Editor
Type: Bug Report
0
The tools are floating right regardless the toolgroups under IE7
The tools are not respected by the toolgroups under IE7 and IE7 standards. This issue causes incorrect layout at resizing and overlay issues of floated tools.
The problem is introduced because the toolgroup elements does not have a properly set width. 

Possible resolution is setting a proper width to every UL at the load event of the editor:

<telerik:RadEditor runat="server" ID="RadEditor1" 
	OnClientLoad="OnClientLoad"></telerik:RadEditor>


<script type="text/javascript">
	function OnClientLoad(editor, args) {
		if (editor.isVisible()) {
			fixToolbarsInIE(editor);
		} else {
			editor.add_firstShow(function () {
				setTimeout(function () {
					fixToolbarsInIE(editor);
				}, 0);
			})
		}
	}

	function fixToolbarsInIE(editor) {
		if ($telerik.isIE) {
			var $ = $telerik.$;
			var editorID = editor.get_id();
			var topTD = document.getElementById(editorID + "Top");
			var toolGroupElements = $(topTD).find(".reToolbar");

			for (var i = 0, l = toolGroupElements.length; i < l; i++) {

				calculateTools(toolGroupElements[i]);
			}
		}
	}

	function calculateTools(toolGroup) {
		var tools = toolGroup.children;
		var size = 0;

		for (var i = 0, l = tools.length; i < l; i++) {
			var tool = tools[i];
			size += tool.offsetWidth;
		}
		toolGroup.style.width = size + "px";
	}
</script>
1 comment
ADMIN
Misho
Posted on: 17 Apr 2014 11:28
The fix will be available with Q2 2014 release.