scottcheng / cropit

A "customizable crop and zoom" jQuery plugin.
http://scottcheng.github.io/cropit/
MIT License
874 stars 305 forks source link

File input dialog slow to appear after Chome update #207

Closed wadadamus closed 7 years ago

wadadamus commented 7 years ago

I've been using cropit with great success for the last month or so, but today I noticed a 5-10 second delay that occurs consistently every time I click the image selector file input button. This delay seems to be due to Chrome firing off a "safe browsing" http request to Google.

I can bypass this issue on my own machine by going into the Privacy section of Chrome's settings and unchecking "Protect you and your device from dangerous sites." However, this will obviously not fix the issue for my users.

Is this Chrome's fault or is the plugin doing something unnecessary that is flagging Chrome's safe browsing safety feature?

wadadamus commented 7 years ago

meh chrome's people seem to be on it

caitlinrouille commented 7 years ago

How did you find that out about Chrome's people are on it? Just curious so I can keep track of this on my own. Thanks!

wadadamus commented 7 years ago

Well... my issue was that the file input click was being intercepted by Chrome, which was then sending a request to https://sb-ssl.google.com/safebrowsing. This request was returning a 502 status after a few seconds, and during those seconds, the file input dialog simply wasn't showing up. Shortly after I diagnosed the issue, it went away. Then it came back. Then it went away again. So I assumed someone working for Chrome was responsible, maybe changing the way they respond to safe browsing requests? Now that you're making me reflect on it, a network issue seems more likely. Haven't seen the problem since, at any rate.

caitlinrouille commented 7 years ago

Interesting. I am having sporadic issues with it being slow in Chrome. Sometimes it opens quick sometimes takes 3 seconds...

chenyangshun02 commented 7 years ago

i fixed this defect and send the merge request