Completed
Last Updated: 10 Aug 2021 13:33 by ADMIN
ADMIN
Nikolay
Created on: 23 Jul 2015 10:10
Category: Editor
Type: Bug Report
0
RadEditor's content element height is not correct when the editor is loaded in Preview Mode in IE7
Steps to reproduce:
Run this in IE7 or another IE in IE7 mode:
<telerik:RadEditor ID="RadEditor1" runat="server" EditModes="Preview"></telerik:RadEditor>

Workaround:
<telerik:RadEditor ID="RadEditor1" runat="server" EditModes="Preview"></telerik:RadEditor>

<script type="text/javascript">
	(function ($T) {
		if ($telerik.isIE7) {
			var prototype = $T.Editor.UI.SizerLegacyIE.prototype;
			var setContentElementHeight = prototype.setContentElementHeight;
			$T.Editor.UI.SizerLegacyIE.prototype.setContentElementHeight = function () {
				setContentElementHeight.call(this);
				var editor = this.editor;
				if (editor.get_mode() != $T.EditModes.Html) {
					var iframeParent = this.getIframe().parentNode;
					if (Math.abs(iframeParent.offsetHeight - editor.get_element().offsetHeight) < 5) {
						iframeParent.style.height = "";
					}
				}
			}
		}
	})(Telerik.Web.UI);
</script>
0 comments