Completed
Last Updated: 09 Jul 2018 12:48 by ADMIN
ADMIN
Marin Bratanov
Created on: 21 May 2018 17:06
Category: SearchBox
Type: Bug Report
1
Cannot fire OnSearch under Firefox in R2 2018, TypeError: access to strict mode caller function is censored is thrown
A workaround is to disable the embedded jQuery and use an older version (for example, 1.11.1 which is the previous version the suite used): https://docs.telerik.com/devtools/aspnet-ajax/controls/scriptmanager/disabling-the-embedded-jquery

Repro steps:

- Put a searchbox on the page with some data source
- Hook its postback handler, OnSearch
- search something in it, select the item to postback

expected: search fired

actual: JS error in FF


        <telerik:RadSearchBox RenderMode="Lightweight" runat="server" ID="RadSearchBox1"
            DataTextField="Name"
            DataValueField="id"
            OnSearch="RadSearchBox1_Search">
        </telerik:RadSearchBox>


    protected void Page_Load(object sender, EventArgs e)
    {
        RadSearchBox1.DataSource = GetData();
        RadSearchBox1.DataBind();
    }
    protected DataTable GetData()
    {
        DataTable tbl = new DataTable();
        tbl.Columns.Add(new DataColumn("id", typeof(decimal)));
        tbl.Columns.Add(new DataColumn("Name", typeof(string)));
        tbl.Columns.Add(new DataColumn("Reason", typeof(string)));
        tbl.Columns.Add(new DataColumn("someField", typeof(decimal)));
        tbl.Columns.Add(new DataColumn("anotherField", typeof(string)));
        tbl.Rows.Add(new object[] { 1, "one", "fi\\nrst", 2, "5" });
        tbl.Rows.Add(new object[] { 2, "two", @"se\ncond", 3, null/*SIMULATE EMPTY VALUE*/ });
        tbl.Rows.Add(new object[] { 3, "three", "third", 4, "5" });
        tbl.Rows.Add(new object[] { 4, "four", "fourth", 5, "5" });

        return tbl;
    }

    protected void RadSearchBox1_Search(object sender, SearchBoxEventArgs e)
    {
        Response.Write(DateTime.Now.ToString());
    }
0 comments