
Chrome 77 Breaking Drag and Drop Events - ardenpm
https://bugs.chromium.org/p/chromium/issues/detail?id=1005747
======
sgentle
If I'm reading the issue thread correctly, it seems that a big revision of the
hit testing code was being field trialled (ie enabled for 1% of stable users)
and a fix to that code in Chrome 77 caused a bug for the other 99%.
Unfortunately, this new bug was only discovered partway through version 77's
rollout.

So now there's a bit of a pinch: revert the fix (and break it for the 1%), or
leave it (break it for the 99%). Presumably, you could disable the field trial
AND revert the fix at the same time, but that wasn't considered. I'm not sure
why, but my guess would be that it's a pain in the butt to coordinate both
rollout systems.

Obviously the right answer is to make a new fix that doesn't break things for
any users, but fixes take time and the release was already halfway rolled out.
I think that's where the discussion about impact came from, and the initial
assessment was that it wouldn't break much stuff, so the fix was bumped to the
next release (Chrome 78).

However, after lots of people jumped on the issue tracker to say it did, in
fact, break a bunch of stuff, Chrome 77 was re-released ("respun") with the
new fix included.

So, broadly speaking, I think the decisions here made sense under the
assumption that it was a small-impact issue. My main criticism would be that
there must be a more effective way to estimate impact than waiting for people
to complain in the bug tracker.

One approach would be some kind of reverse integration testing system. ie, if
you have a critical app or library that depends on Chrome, there should be
some way of submitting your tests so that the Chrome team can estimate the
impact of changes and find out more easily if they'll break anything
unexpected.

Rust does this with a system called Crater: [https://rust-
lang.github.io/rustc-guide/tests/intro.html#cra...](https://rust-
lang.github.io/rustc-guide/tests/intro.html#crater)

And apparently Yocto has something similar:
[https://lwn.net/Articles/788626/](https://lwn.net/Articles/788626/)

~~~
ninju
>...My main criticism would be that there must be a more effective way _to
estimate impact than waiting for people to complain in the bug tracker_.

This is very true. There are 100s if not thousands of people for every support
person that knows about new Chrome updates and Bug Tracker for opening issues.

Users are told to trust Chrome updates and assume that updates _won 't affect_
existing functionality and so the idea of opening a browser support ticket
does immediately come to mind.

------
ardenpm
Spent half the morning trying to work out why drag and drop events were not
working properly in code that was working fine and deployed for nearly a year.
Finally tracked it down to this obscure bug in Chrome 77 which re-orders drag
and drop events but only when your page is inside an iframe that is hosted on
a different domain. Looking at the report it looks like this has broken a lot
of peoples applications and likely a lot more that haven't yet worked out this
is the reason. Looks like a fix is coming in 78 fortunately.

~~~
sbr464
I work on drag & drop a lot, especially right now. It's interesting how
complicated overall, and how many different (code) solutions there are to the
general drag & drop UX problem. I was consolidating ideas/notes from older
notebooks a few mornings ago, I couldn't help thinking how it feels like
reimplementing human evolution in a different/abstract medium.

~~~
dmix
Agreed, it's a much harder problem to get right than it looks on the surface
"sure I can add drag & drop easily!". Like a lot of things in software...

~~~
jdnenej
You can add drag and drop quite easily if you use a library for it.

~~~
dmix
That’s exactly what you think going in...that’s the point I’m making.

No one is hand rolling drag and drop these days.

There’s a lot of complexity implementing drag and drop both visually and
binding stuff to events. It’s messy and finicky. Unless your usecase is very
simple.

------
egeozcan
I switched to Firefox after they stopped caring about usability issues (like
right clicking without releasing left mouse button deselects the text since v
fifty-something on windows), the difficulties they created for ad blockers,
the account integration fiasco, and so on.

I know this particular bug seems to be an edge case that may happen with every
browser, but when you are using Chrome, you should know that if an issue
doesn't affect Google, it will likely be deprioritized a lot.

I'm not a self-acclaimed internet freedom fighter, I'm actually very
pragmatic, and I'd still humbly suggest everyone to give Firefox a try.

~~~
nly
Given that Chrome ended Opera, and is effectively ending IE/Edge, people
really need to take pause and appreciate and be thankful that Firefox is still
around. I think the "shady shit" Mozilla has pulled lately are death rattles.
I certainly don't expect it to be around in another 5-10 years.

Firefox's tiny market share is all that stands between all the W3C and WHATG
publications going from "standards" to "what Chromium does".

Google is a giant corporation. One day they're going to do an IE6, and shift
their focus away from the project, and the whole web will suffer.

~~~
pawelmurias
Why would they ever do an IE6? They don't want to cripple the web as an
application platform as MS did but move as much things as possible onto it.

~~~
mpol
"Doing an IE6" for Google would be quite different from what Microsoft did,
who wanted the desktop to stay relevant. For Google the web is just an
advertisement platform. If/When Firefix is gone, they will hold all the cards.
"Doing an IE6" might mean removing support for ad-blockers. Or making Google
DNS mandatory. Or have everything you do on the web be phoned to Google, to
improve your advertising experience. Assume they will find creative ways to
monetize the web, ways that we didn't even think of yet. If you thought the
web in 2019 was bad, beware of the Google Future.

~~~
pavlov
AMP seems to be an example of the kind of web that (some parts of) Google
wants. Hosted on their servers, transformed by their tools, commoditized and
sanitized for ad insertion.

Today when you navigate to google.com from Microsoft Edge, there's a barrage
of popups urging you to use Chrome instead.

When Chrome is completely dominant, maybe those popups will be on non-AMP
sites urging you to "get the best experience"? It's guaranteed that there will
be a lot of internal pressure to use Chrome to promote the goals of other
divisions at Google.

------
stefan_
Love the random comments in the bug tracker. "We have an enterprise-level
software affected, what is the ETA?"

Lots of folks just figuring out web apps don't run in a metaspherical happy
place or "the cloud", no, they run on fucking Chrome and you are not paying
for it.

~~~
forgottenpass
That's the trend these days.

Tomorrow everyone on Hacker News and Twitter will go back to chiding IT
departments that want the ability to test software changes before they get
deployed, or have the ability to roll back.

~~~
repolfx
In fairness, when was the last time you read a story like this one?

Chrome updates constantly and regresses nearly never. It's actually impressive
how rarely this happens given the complexity of HTML. Slow IT departments
delaying useful upgrades is an everyday occurrence though.

------
yreg
I find the tone the maintainers used when talking to reporters interesting.

>[Do you have a] live website or is it a project under development? […] We
will fix the issue for 78 if that is alright with you.

or

>Are they going to upgrade to 77? Enterprise customers usually only upgrade if
things are alright.

As if the reporter's apps were more special than the thousands of other
websites that it broke.

And I don't mean this in a negative way, I'm just surprised.

~~~
londons_explore
> As if the reporter's apps were more special than the thousands of other
> websites that it broke.

Frequently breakage like this affects literally only one site. The engineer
probably thought that was the case here.

~~~
yreg
Could be. OTOH if a bug in Chrome affects only one not-well-known site, then
it is neat that the engineers bother discussing the mitigation and providing
support to the dev of that site.

------
wazoox
Funny, my company has been developing an application that suddenly behaved
bizarrely in Chrome 76 (some divs were constantly jumping up and down the
page, augh). We pulled our hair on this problem for a week, then suddenly
Chrome 77 corrected that... But apparently it's broken elsewhere?

------
Waterluvian
I've been dealing with a massive performance regression in the canvas API. The
frustrating bit is that they were well aware of the cost and made the change
anyways. They didn't seem to stop and consider what effect it might have on
major libraries and applications.

[https://bugs.chromium.org/p/chromium/issues/detail?id=100184...](https://bugs.chromium.org/p/chromium/issues/detail?id=1001845)

~~~
stefan_
No, you are just not understanding the tradeoff. They fixed some canvas not
being accelerated when they should have been. This means they can be hardware
composited, drawn to and need to only exist once as a GPU texture. This is a
massive win for performance and power consumption.

Here is what is not efficient, ever: getting a GPU texture into a raster
format CPU accessible buffer. At best this requires synchronization and a full
memory copy into a new buffer, but it can easily be much much more expensive
because GPUs, and mobile GPUs basically never, store textures in raster
formats. So now you need a full copy and a bunch of extra SIMD to convert it
from the GPU preferred format into raster format for your getImageData call.

And all this for what is essentially a trap API! Chances are if you are
calling getImageData regularly, you are doing something wrong and inefficient.

~~~
throwaway_bad
> Chances are if you are calling getImageData regularly, you are doing
> something wrong and inefficient.

I would love to see stats on the use cases. Personally I have never used
canvas other than to getImageData in a loop!

If I only needed to draw primitives, SVG is often a better choice.

If I needed something GPU accelerated, I would switch to webgl and write
shaders.

So the only thing left 2D canvas is good for is to get the pixel data to do
image processing on (e.g., flood fill connected components, color histograms,
etc).

------
cuddlecake
Just realized that I never use the drag and drop I implemented in my
application.

Wonder if it actually still works.

~~~
onion2k
... and this, reader, is why we have end-to-end testing.

~~~
mcintyre1994
Probably more a case of me never having tried than anything else because I'm
sure someone will have solved it, but end-to-end testing of drag and drop
sounds pretty hard.

~~~
onion2k
It isn't. Jest and Puppeteer are my current choice, and it's really just a
matter of sending mousedown, mousemove, and mouseup events to the browser and
checking the expected behaviour is right.

It makes a huge difference to how long you send testing manually.

------
greggman2
While we're on Chrome bugs am I the only person in the world running into this
bug in Chrome that makes it DOS the entire machine? You can repo on an NVidia
MacBook Pro. Go to stackoverflow, try to make a new code snippet it (click the
snippet button in the toolbar), then try typing in the snippet (hold a letter
key and watch it repeat). You should notice some bug related to drop shadows
ends up DOSing the GPU and the entire system runs slow. The bug has existed
since around June. They claim to be trying to fix it, or rather ship the fix
that already exists but needs testing, but I'm just surprised I seem to be the
only person who runs into the issue. (The subset of people who write snippets
on stackoverflow on an NVidia MacBook Pro). No idea what other sites are
affected. If more sites are affected that would raise the priority for fixing.
If most people are not affected then it's reasonable it's not a high priority.

------
newnewpdro
I had to fire up Epiphany recently just to do drag-n-drop graphics assets
management in the Steam app admin page.

Both Firefox and Chromium were broken, when I contacted Steam's support they
said I am the only person having problems.

When I dug into the failure a bit in Firefox the object coming with the event
was always NULL, and searches turned up a bunch of results from web devs
struggling with the same problem in various ways.

I'm glad Epiphany worked, so I could promptly forget it all and get on with my
life. Presumably it's still broken for steam app devs however. It escapes me
why Valve doesn't have a simple file browser button fallback for when this
crap doesn't work.

------
tiglionabbit
The way Chrome displayed flexbox stuff permanently changed at some point after
version 70, breaking an app of mine that had been working fine for years.

------
uasm
> "I wish the reporter could elaborate more on whether there are live websites
> broken due to this or is it a project under development so we can measure
> the impact more."

(Quoted a comment from the thread on
[https://bugs.chromium.org/p/chromium/issues/detail?id=100574...](https://bugs.chromium.org/p/chromium/issues/detail?id=1005747))

Wasn't this specific version of Chrome rolling out to production users world-
wide? Clearly there was a subset of users that was impacted by this
(otherwise, a report wouldn't have been made in the first place). Not sure why
they're asking the reporter about the state of their specific project?... :\

------
williamstein
For the last few weeks, Chrome 77 breaks very badly when there are more than
255 failed websocket attempts:
[https://bugs.chromium.org/p/chromium/issues/detail?id=100624...](https://bugs.chromium.org/p/chromium/issues/detail?id=1006243)
Even refreshing the page doesn't workaround the problem (you have to open a
new tab). This has been causing a lot of trouble for long running single page
applications that use websockets. Fortunately, a fix is being rolled out right
now for Chrome. We've also been getting reports of this other websocket
connection issue breaking SPA's.

------
muststopmyths
I have a very old Macbook that I keep around for occasional use. The latest
version of Chrome has a serious performance problem with it. Every click on a
web site brings up the spinning cursor and there are several seconds of
latency. Safari on the same computer has no such problem, so it's not the age
of the machine.

I reported the issue, after navigating several-second UI lag, but not holding
my breath for them to fix something on an old OS/hardware.

It seems like every release of a Google product(the ones that I use anyway,
gmail, Chrome, Voice) brings some downside/regression.

Can anyone recommend script blockers for Safari ? It was the main reason to
use Chrome for me.

------
js8
It seems like drag-and-drop is out of fashion. I think big reason is that it
really cannot be done well on touch-screen devices and touchpads. I don't
really complain, because I have always found d&d rather impractical (and it's
also terrible for accessibility); unfortunately, there are some applications
that still rely on it a lot.

(As an aside, what bothers me more that the right-click menu goes out of
fashion. That I feel is a bigger usability problem.)

~~~
pmontra
A customer of mine uses Kanbanize to organize software development. Think
Trello on steroids. I imagine that instead of dragging cards to their
destination we could open a menu and select the destination column. Maybe that
would be even faster sometimes. However reordering cards inside a column
without drag and drop would be a pain: Move Up, Move Down buttons, no thanks.

~~~
js8
I don't disagree, this is a great example. I think d&d can work in special
cases where the distance for the item to travel is not too small (so that you
wouldn't move things by accident), but it is also not uncomfortably far away
so that you don't see the target and have to navigate to it while you're
d&d-ing. I guess these limiting factors are what makes it tricky to get right.

But what about selecting a card and being able to move it around with the
keyboard?

~~~
pmontra
Click to select and move with arrow keys could be OK. We should measure times
but my gut feeling is that if I already have my hand on the mouse or touchpad
(in my case it's always a touchpad) then I can keep using it to move the card
around without the extra time to reach for the keys.

Gut feeling again: the keyboard could be more effective on larger distances
because each tap of a key is a full movement of one row or one column, and no
mistakes.

People using a mouse probably need more time to release the mouse and move
their hand back to the keyboard, unless they are left handed: mouse on the
left and right hand already close to the arrow keys.

About drag and drop: it's a mess if you can't see both source and destination
at the same time. Then you drag hoping to be headed into the right direction.
A right click menu could be better in those cases.

~~~
tremon
_Click to select and move with arrow keys could be OK_

Oh god no. Like you already state, most people operate both the mouse and the
arrow keys with the right hand, so your proposal adds a lot of unnecessary
movement. It could work with click to select and with WSAD keys, but most
office users wouldn't discover that mode.

I would much prefer navigation keys (arrow keys, page up/down, home, end) to
select, shift+navigation keys to move.

------
shadowgovt
It looks like they were able to back-port the fix for this into Chrome 77.
Hopefully, the issue won't stay live too long.

------
dmix
Chrome Canary is currently 79.0. The mainline version is 77.

Edit: I wasn't able to reproduce in either, didn't dig into why

~~~
shakna
> Edit: I wasn't able to reproduce in either, didn't dig into why

Not just drag 'n drop, but a drag 'n drop inside an iframe that points to a
different domain.

~~~
dmix
I meant using the supplied jsfiddle in the ticket...

------
bibinou
fixed in 77.0.3865.120

------
est
After the Chromium removed chrome://net-internals/, the browser is not worth
it anymore.

~~~
Santosh83
Wow, why on earth did they do this!? Are they _trying_ to hobble devs working
with their browser?

~~~
shadowgovt
There's a good breakdown of the decision here
[[https://bugs.chromium.org/p/chromium/issues/detail?id=892453](https://bugs.chromium.org/p/chromium/issues/detail?id=892453)].

The short version is that the value to devs was offset by the cost borne by
every user (those components were in the binary even if they were never used,
and they pulled in libraries that weren't used by anything else) and the
increased attack surface of having that tool in place.

------
asdf12346
How is that even possible that bugs like that made it to production?

They do not write tests or something?

~~~
shadowgovt
The combinatorics of browser features described by the standards are not unit-
testable in the scale of human lifetimes.

That having been said, if they didn't have a test for this situation before, I
assume they do now. ;)

~~~
pearjuice
The combinatorics were written in code in a human lifetime so there should
have been tests for it.

~~~
shadowgovt
No, that's the problem. The individual items in the specification were written
in a human lifetime. Full testing of the specification requires consideration
of the power set of those items.

(I mistated earlier when I said unit tests. Determining if the right order of
events is fired is probably a functional or integration test. And full
coverage on those is the problem of covering the power set of features of a
system.)

------
oldmanthrowit
Why does anybody still use Chrome? Really, Google is a criminal data theft
organization.

Why not just take all of your browsing data and publish it online, skip the
middle man?

~~~
shadowgovt
It's real convenient to have all my browser preferences follow me when I boot
up my browser on another computer.

------
safeplanet-fesa
Jokes on them, I still use Chromium 67 from chromium.woolyss.com. It's the
last version before WebRTC became unremovable. Now it's impossible to download
this version, only the new ones. Woolyss should have kept it, like they keep
Chromium 49, the last version before Chromium stopped running on XP and Vista.
And I understand the risks of running an obsolete version, but it's a trade-
off. For some time I was thinking of updating it, but then Google came up with
lots of anti-consumer browser-crippling features.

~~~
dchest
Older versions are full of known vulnerabilities.

~~~
showdead
Not disputing this, but the UX of navigating to a bank's website using Chrome
on XP and getting redirected to a "Download Chrome" link when there isn't a
newer version for your OS isn't a great experience either.

