Completed
Last Updated: 07 Aug 2015 07:14 by ADMIN
ADMIN
Ianko
Created on: 27 Jun 2014 12:48
Category: UI for ASP.NET AJAX
Type: Bug Report
0
The Content Area Height is not calculated correctly when Editor is with Content Area Iframe under iOS mobile devices
The issue is due to failing recalculation logic of the iframe content area. 

To resolve the issue you can use a RadEditor control with ContentAreaMode="Div" to render the content area as a DIV element, instead iframe.  

If the iframe mode is needed, you can use the following workaround to fix the content cell and the iframe appearance. 

<telerik:RadEditor ID="RadEditor1" runat="server" height="50px" OnClientLoad="OnClientLoad">
	<Tools>
		<telerik:EditorToolGroup>
			<telerik:EditorTool Name="Bold" />
			<telerik:EditorTool Name="Italic" />
			<telerik:EditorTool Name="Underline" />
		</telerik:EditorToolGroup>
	</Tools>
</telerik:RadEditor>

<script type="text/javascript">
	function OnClientLoad(editor, args) {
		setTimeout(function () {
			var editorIframe = editor.get_contentAreaElement(),
				originalIframeHeight = editorIframe.offsetHeight,
				contentCell = editorIframe.parentNode,
				cellSize = contentCell.offsetHeight,
				isCellSmaller = (originalIframeHeight - cellSize) > 2;
		
			if (isCellSmaller) {
				contentCell.style.height = originalIframeHeight + "px";
			}
		}, 0);
	}
</script>

0 comments