fengyuanchen / cropper

⚠️ [Deprecated] No longer maintained, please use https://github.com/fengyuanchen/jquery-cropper
MIT License
7.75k stars 1.74k forks source link

js error: Pace.js pulgin conflict for the "xhr.open()" method #985

Closed gaojianzhuang closed 6 years ago

gaojianzhuang commented 6 years ago

If the page reference the "Pace.js" plugin, because the pace JS override the "xhr.open" method, the third parameter is not default true, this will cause the "xhr.open" in the cropper throw an exception, I think we should change the code to “xhr.open('get', url, true);” instead of the “xhr.open('get', url);”. This change will avoid the js error.

FYI.

fengyuanchen commented 6 years ago

The third parameter is optional and default to true according to spec: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/open