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

Paste Plain Text pop-up causes you to jump to the top of the page.

3 Answers 99 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Jason
Top achievements
Rank 1
Jason asked on 02 Nov 2012, 05:40 PM
When I use the Paste Plain text pop-up (associated with the non IE browsers), Although the Paste Plain text popup will appear directly over the RadEditor, the browser will jump UP to the top of the page and you will need to scroll back down to where the RADeditor is loaded to continue editing. This only happens the first time when pasting into the Radeditor and only from the non IE browsers.

Its not apparent on pages that are not tall, or where the RadEditor is at the top of the page. But in instances where the RadEditor appears low on the page it's quite annoying. Is there anything that can be done to prevent this jump?

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 03 Nov 2012, 08:04 PM
Hello,

I would propose two solutions for this issue:
  • Set editor.set_useClassicDialogs(true); in the OnClientLoad function. Thus the editor will use the browser's modal dialog to show its dialogs
  • Or show the PastePlainText dialog when the page is loaded and close it. This will be invisible to the user. Once opened for a second time the scrolling issue will not occur:

<telerik:RadEditor ID="RadEditor1" runat="server" OnClientLoad="OnClientLoad" StripFormattingOptions="NoneSupressCleanMessage">
</telerik:RadEditor>
<script type="text/javascript">
function OnClientLoad(editor, args) {
  if (!$telerik.isIE) {
    editor.fire("PastePlainText");
    editor.get_dialogOpener()._dialogContainers.CleanPasteTextContent.close();
  }
}
</script>

Kind regards,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Antonio Bakula
Top achievements
Rank 1
answered on 02 Oct 2014, 09:47 AM
We used second "solution", and on pages with more than few editors this causes all sorts of flickering in editors, some kind of slow fade in and browsers complain about long running script, so this is no solution.

And yet 2 years later same bug still remains, does Telerik plan to anything with this bug ?
0
Ianko
Telerik team
answered on 03 Oct 2014, 08:14 AM
Hi Antonio,

Thank you for the feedback. 

Firstly, I created this feedback portal item, so that you could track any updates on the logged bug.There you can also find more details and alternative solution for the described issue.

Let me continue with some explanations about the origin of the discussed matter (the undesired page scrolling). On my end I am able to reproduce it only under Chrome. This behavior stems from an automatic textarea focusing (the textarea located in the paste dialog). It appears that when the dialog is initialized Chrome puts the dialog at the top of the page and the focusing of the contained textarea causes the page to scroll to this position. At a later stage the dialog is correctly positioned (centered) and the behavior stop to occur.

This is mainly considered as a browser behavior that cannot be controlled by the RadEditor logic. Indeed, the auto-focusing logic is partially responsible, although it is created due to UI requirements.

Investigating the described scenario, I can see that in the described situation this auto-focusing behavior causes more negative behavior. This is why a logged this as a bug report.

The provided solution in the feedback portal item is to customize the Plain Paste text dialog (MozillaPasteTextDialog.ascx) and remove the auto-focusing functionality. 

You can find attached a sample page with the suggested resolution placed. 

Regards,
Ianko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Editor
Asked by
Jason
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Antonio Bakula
Top achievements
Rank 1
Ianko
Telerik team
Share this question
or