This is a migrated thread and some comments may be shown as answers.

Kendo Editor jumps to bottom when inserting br in large text block

1 Answer 293 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Dominic
Top achievements
Rank 1
Dominic asked on 22 Mar 2014, 04:46 PM
I have a kendo editor control which is used to edit text containing <br> tags for newlines.  The text is long, causing the editor to show a scroll bar.  To preserve compatibility with existing data, I have overridden the newline command to insert <br> tags instead of paragraphs:

      $("#txtEditor").kendoEditor({
        tools: [
          { name: "insertLineBreak", shift: false },
        ]
      });

This works fine, except that when I do this and insert a new line near the top, now the editor scrolls to the end of the text block, which makes the scroll bar jump down.  Is there any way to avoid this happening?

I am using Kendo UI Complete v2013.3.1119 and the JQuery version it came with, Windows 7, tested in Firefox 27.  I can replicate this in the demo on the Kendo site as well by inserting some text and using shift+enter to insert some new lines.

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 25 Mar 2014, 02:11 PM
Hi Dominic,

The observed behavior is by design - when a new paragraph or line break is inserted, the Editor automatically scrolls to the next sibling. It seems that in your case you have very long chunks of text, which are higher than the Editor's content area.

Avoiding this issue without breaking other required functionality (e.g. scrolling down when you press Enter at the end of the document) is currently not possible. Apologies for any inconvenience caused.

http://www.telerik.com/forums/editor-position-when-editing-text-when-scrollbar-present

Regards,
Dimo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Editor
Asked by
Dominic
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or