My site doesn't work after the update Chrome 83

432 Views Asked by At

So, I have website on ext.net 1.7 (last version), and after updates my site doesn't works. The Chrome-console shows no errors. It's just no worked. But it worked in previous versions of Chrome. WebConsoleErrors

I read about change in Chrome but found nothing the problem. Does anyone know what the problem is?

1

There are 1 best solutions below

7
Nikita Danilov On BEST ANSWER

try this

(function () {
 function isChromium() {
  var isChromium = window.chrome;
  var winNav = window.navigator;
  var isIOSChrome = winNav.userAgent.match("CriOS");

  if (isIOSChrome)
   return true;
  else if (isChromium !== null && typeof isChromium !== "undefined")
   return true;
  else
   return false;
 }

 if (isChromium()) {
  Ext.override(Ext.data.Connection, {
   doFormUpload: function (o, ps, url) {
    var me = this;
    var doc = document;
    var form = Ext.getDom(o.form);
    var hiddens = [];
    var hd;

    Ext.iterate(Ext.urlDecode(ps, false), function (k, v) {
     hd = doc.createElement('input');
     Ext.fly(hd).set({
      type: 'hidden',
      value: v,
      name: k
     });
     form.appendChild(hd);
     hiddens.push(hd);
    });

    var formData = new FormData(form);

    function successCallback(data) {
     var r = {
      responseText: '',
      responseXML: null,
      argument: o.argument
     };

     if (data) {
      var match = /<textarea>(.+)<\/textarea>/i.exec(data);
      if (match != null && match.length >= 2) {
       r.responseText = match[1];
      } else {
       r.responseText = data;
      }

      r.responseXML = $.parseXML(data);
     }

     me.fireEvent("requestcomplete", me, r, o);

     function runCallback(fn, scope, args) {
      if (Ext.isFunction(fn)) {
       fn.apply(scope, args);
      }
     }

     runCallback(o.success, o.scope, [r, o]);
     runCallback(o.callback, o.scope, [o, true, r]);
    }

    $.ajax({
     type: 'POST',
     url: url,
     data: formData,
     processData: false,
     contentType: false,
     success: successCallback,
     error: function () {
      console.log(arguments);
     }
    });

    Ext.each(hiddens, function (h) {
     Ext.removeNode(h);
    });
   }
  })
 }
})();
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>

You should insert current script in body for all pages after load extjs