HTTP requests canceled in Chrome 83

Viewed 2879

I am using using telerik for some pages in my asp.net solution. On the start page, I have some buttons with the same design( they are ment to redirect to a aspx page) eg

<telerik:RadButton runat="server" ID="Button" NavigateUrl="Dest/Example.aspx"

Since latest chrome update (v 83), all requeste made are failing ( with status canceled). The initiator seems to be }else{if(!e||e=="_self"){window.location.href=h; (telerik resource)

Does someone has an idea? Any help is appreciated.

3 Answers

It seems a Google Chrome update to version 84 fixes this issue and the old versions are working properly once again. Can you please confirm that?

Also, if you are using the R2 2020 SP1 version and encounter issues, you can try bringing back the original behavior of the postback functionality.

You can also subscribe and share your scenario in the feedback portal item:

Restore the pre-service pack version:

Place the following script under the ScriptManager of the page.

Telerik.Web.UI.Button.PostbackFunctionality.prototype.clicked = function (ev) {
    var that = this;
    var baseResult = that.base.clicked(ev);

    that._isInput = that._isEventTargetButton(ev);

    //FIX: The AjaxManager does not update the affected update panels when the default button fires the click under IE browsers,
    //so we need to set _activeDefaultButtonClicked to null, in order to for the Ajax to work
    var requestManager = Sys.WebForms ? Sys.WebForms.PageRequestManager.getInstance() : null;
    if (requestManager) requestManager._activeDefaultButtonClicked = true;

    // old version code
    var pbResult = that.options.autoPostBack ? that._postback() : false;

    // new version code
    //var pbResult = that.options.autoPostBack;
    //var isNavigating =
    //    (that.options.buttonType == 1
    //        || that.options.buttonType == 4)
    //    && that.options.navigateUrl != "";

    //if (pbResult && !isNavigating) {
    //    that._postback();
    //}
    //else {
    //    pbResult = false;
    //}

    if (requestManager) requestManager._activeDefaultButtonClicked = false;

    delete that._isInput;

    return (baseResult && pbResult);
}

So I am having the same issue and I believe this may need to be addressed at the browser level, but here is a workaround that is working for me until they fix it. I also tested that this is not limited to telerik, also asp buttons are broken. We have a lot of applications that have this type of code and it would be insane to add this code to all those spots. I guess we shall see if Chrome fixes it soon or not. I also sent in a "report a problem" on the about page in chrome and mentioned this.

Solution:

add OnClientClicking="OnClientClicking" to your button like this:

<telerik:RadButton runat="server" ID="Button" NavigateUrl="Dest/Example.aspx" OnClientClicking="OnClientClicking" />

and then in the javascript section add this: (taken and modified from teleriks radbutton demo code)

<script>
OnClientClicking = function (sender, args) {
    var $ = $telerik.$;

    if (sender.get_navigateUrl() && sender.get_buttonType() == Telerik.Web.UI.RadButtonType.LinkButton) {
        var url = sender.get_navigateUrl()
        //radopen(url, url);
        window.location.href = url;
        args.set_cancel(true);
    }
};
</script>

Hope this helps!

You can also fix the issue by using RadPushButton and/or RadLinkButton instead of RadButton. They are a modern version of RadButton.

Update: The problem is fixed in R2 2020 SP1. An improvement will be also added in R3 2020, to be out on Sept 16, 2020.

Related