Error displaying Find and Replace dialog in mobile

1 Answer 74 Views
Editor
SUNIL
Top achievements
Rank 2
Iron
SUNIL asked on 12 Jan 2022, 10:21 AM

I have a RadEditor with RenderMode="Auto" as in html code below ( there is no code-behind for this page since no server-side code is being executed).

When I switch to mobile view on Chrome Dev tools then I see the RadEditor render in mobile mode. But, if I click on Find and Replace icon of RadEditor, then it results in a JavaScript error as shown in attached screenshot. It seems that RenderMode="Auto" doesn't work as expected. 

Do you know of any workaround that can fix this problem? I am using R2 2020 version of ASP.Net AJAX controls. I  need to use RenderMode="Auto" since that is needed for seamless skinning of all controls on the aspx page.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RadEditor.aspx.cs" Inherits="RadEditor" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no">
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager runat="server" ID="sm1"></asp:ScriptManager>
        <telerik:RadEditor runat="server" ID="RadEditor3" RenderMode="Auto"> </telerik:RadEditor>
    </form>
</body>
</html>

1 Answer, 1 is accepted

Sort by
1
Accepted
Rumen
Telerik team
answered on 12 Jan 2022, 02:22 PM | edited on 12 Jan 2022, 02:30 PM

 

Hi Sunil,

I have good news that the bug will be fixed in the upcoming R1 2022 release due in mid-January 2022.

For the earlier versions, you can fix the issue by enabling the FindReplaceOverlay functionality by setting RadEditor1.FindReplaceOverlay.Visible = true; in the Page_Load handler:

    protected void Page_Load(object sender, EventArgs e)
    {
        if (RadEditor1.ResolvedRenderMode == Telerik.Web.UI.RenderMode.Mobile)
        {
            RadEditor1.FindReplaceOverlay.Visible = true;
        }
    }

 

Best Regards,
Rumen
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/.

SUNIL
Top achievements
Rank 2
Iron
commented on 13 Jan 2022, 08:17 AM | edited

Hi Rumen,

Thankyou for your response.

I could not find any instance method called FindReplaceOverlay on the radeditor instance.

Thanks

Sunil

Rumen
Telerik team
commented on 13 Jan 2022, 08:45 AM | edited

The source code history shows that the FindReplaceOverlay setting is available since April 2015. Is your Telerik.Web.UI.dll older than it? Which assembly version is referenced by your app? 

For your convenience, I have attached a simple test project for you to see how the proposed solution works with a relatively older version like 2020.1.114.

SUNIL
Top achievements
Rank 2
Iron
commented on 13 Jan 2022, 12:08 PM | edited

Here is the video which shows there is no method by that name: https://www.screencast.com/t/HGYNzykJ

I actually  had an older version 2018.3.910.45 in the website project.

Then, I updated the Telerik assembles in this website project to version 2020.2.617.45.

In both the above versions, I saw that FindReplaceOverlay method was not there.

But, the sample you sent works on my end and the method is found, even though the Telerik.Web.UI.dll your sample is using is older that 2020.2.617.45 that I am now using.

Rumen
Telerik team
commented on 13 Jan 2022, 12:26 PM | edited

Yes, the FindReplaceOverlay property does not appear in the intellisense because it's Browsable attribute is set to false:

                [Browsable(false)]
		[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		[EditorBrowsable(EditorBrowsableState.Never)]
		public FindReplaceMobile FindReplaceOverlay

 

Nevertheless, you can use it with version 2018.3.910.45 as shown in my video: http://youtu.be/P78ZAdONUGU?hd=1 and work around the problem.

By the way, we are going to release R1 2022 with the fix applied in the middle of the upcoming week. 

SUNIL
Top achievements
Rank 2
Iron
commented on 13 Jan 2022, 12:42 PM

The strange thing I am seeing is that if I take your sample project which you sent and just replace all dll files in bin folder to version 2020.2.617.45, then it works. 

So, the question is why it isn't working with same version in my website project? 

SUNIL
Top achievements
Rank 2
Iron
commented on 13 Jan 2022, 12:53 PM

Yes, it works now after using your approach for adding the method to intellisense in Visual Studio. Thankyou for your help.
Tags
Editor
Asked by
SUNIL
Top achievements
Rank 2
Iron
Answers by
Rumen
Telerik team
Share this question
or