Completed
Last Updated: 26 Sep 2014 15:54 by Frank
ADMIN
Ianko
Created on: 23 Apr 2014 12:40
Category: UI for ASP.NET AJAX
Type: Bug Report
2
Content in a DIV element cannot be selected under IE when the element is set with size attributes
This issue causes inconvenience among users. Block elements in the content cannot be edited properly when used in the RadEditor.

You can workaround this problem by overriding the setActive method of the RadEditor's object:

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

<script type="text/javascript">
	Telerik.Web.UI.RadEditor.prototype.setActive = function () {
		var $T = Telerik.Web.UI;

		if (this._emptyMessageContainer) this._hideEmptyMessage();

		if ($telerik.isIE && this.getSelection().isControl()) return;

		var curArea = this.get_mode() == $T.EditModes.Html ? this._getTextArea() : this.get_contentArea();

		if ($telerik.isIE) {
			var activeElement = this.get_document().activeElement;
			if ((activeElement && activeElement == curArea) ||
			$telerik.$.contains(curArea, activeElement)) {
				return;
			}
		}

		if (curArea && curArea.setActive) curArea.setActive();
	};
</script>
3 comments
Frank
Posted on: 24 Apr 2014 08:11
Thanks for correcting the code. It works fine now :)
BR Frank
Frank
Posted on: 23 Apr 2014 13:30
Perhaps too fast?
The fix does not work for me?
Frank
Posted on: 23 Apr 2014 13:19
Nice and very quick. :)
Thanks for good support.
Frank