Completed
Last Updated: 29 Apr 2021 14:37 by ADMIN
ADMIN
Vessy
Created on: 23 Nov 2015 12:27
Category: Editor
Type: Bug Report
3
The content of RadEditor is not scrolled properly after paste
The content is not scrolled to the end of the pasted content in IE11 - the scrollbar keeps its initial position instead. The issue is reproducible in IE (tested in IE11) and Chrome, but not in Firefox nor standard editable iframe.

Steps to reproduce:
1. Open in IE: http://demos.telerik.com/aspnet-ajax/editor/examples/overview/defaultcs.aspx
2. Paste big enough content, so the scrollbar will be shown

Actual: The scrollbar stays on the top.
Expected: The content area is scrolled to the end of the pasted content

Possible workaround could be creating a temporary selectable element after the pasted content, which to be selected manually:
		<telerik:RadEditor ID="txtMessage"  runat="server" OnClientPasteHtml="OnClientPasteHtml">
		</telerik:RadEditor>
		<script>
			function OnClientPasteHtml(editor, args) {
				if (args.get_commandName() == "Paste" && $telerik.isIE) {
					args.set_value(args.get_value() + "<div id='selectableEl'></div>");
					setTimeout(function () {
						var selectedEl = editor.get_document().getElementById("selectableEl");
						console.log(editor.getSelectedElement());
						Telerik.Web.UI.Editor.Utils.scrollTo(selectedEl, editor);
						$telerik.$(selectedEl).remove();
					}, 0);
				}
			}
		</script>
2 comments
ADMIN
Vessy
Posted on: 29 Apr 2021 14:37

Hi Dhafer,

The issue related to this item was fixed in our Q1 2016 SP1 release and should not be reproducible with the latest version. In case you are facing a similar behavior, please, open a primary support ticket with the needed steps to reproduce it, so we can examine the reason for it further.

Regards,
Vessy
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Dhafer
Posted on: 27 Apr 2021 20:42
Has this been solved, or is it the same with the most recent version?