40 ms·
Chrome 77 Breaking Drag and Drop Events
- ardenpm 7y agoSpent 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 7y agoI 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 7y agoAgreed, 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 7y agoYou can add drag and drop quite easily if you use a library for it.
- dmix 7y agoThat’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.
- meesles 7y agoTo add to sibling's point, many drag-drop libraries work great on a bare demo website with nothing else to worry about. Once you start trying to add it to your frontend with other complex features already there, you're back having to reason about the core of drag-and-drop and essentially solving it yourself to parse the library's code. In my experience I've had to modify library code to handle my requirements most of the time because it did not play well in a complex environment.
- Dylan16807 7y agoTo me it's very interesting to see how many applications completely forgot that you might want to use a scroll wheel during a drag and drop. I don't think that even works half the time...
- stekern 7y agoYeah, I can attest to this. It sounds easy at first, but suddenly you need to handle items inside virtual lists (e.g., react-window), scrolling, data updating while dragging, ...
- DougBTX 7y agoThe fix is in 77.0.3865.120 (see comments 45, 46), if you update to current stable it should be fine.
- Zarel 7y agohttps://bugs.chromium.org/p/chromium/issues/detail?id=410328&can=8&q=&colspec=ID%20Pri%20M%20Stars%20ReleaseBlock%20Component%20Status%20Owner%20Summary%20OS%20Modified https://bugs.chromium.org/p/chromium/issues/detail?id=410328... I've been tracking this drag-and-drop bug from five years ago; it's still not fixed. I think most browser manufacturers mostly gave up on the HTML5 drag-and-drop API. There are lots of open bugs on lots of browsers that haven't been touched in ages.
- XaspR8d 7y agoWell that makes me feel better AND worse about the one I filed a year and a half ago. (Drag events aren't dispatched at all on option elements in a multi-select, which is such a shame because a multi-select seems like the best native form UI for users to create orderings & permutations...)
- js8 7y agoIt 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.)
- jarfil 7y ago> cannot be done well on touch-screen devices I literally just drag-and-dropped that text on a phone.
- js8 7y agoGood for you! I personally find it difficult to do it without a mouse. And even with mouse it's error prone, you might accidentally move your mouse during clicking on something, and d&d something somewhere that you don't really want to (classic example is moving folder into another folder in the file open dialog).
- imhoguy 7y agoDnD is natural human gesture to move things around. Implementation is imperfect but Undo should help then. Desktop has all this sorted out for years.
- js8 7y agoUnfortunately, there is no Undo on the file open dialog. So, no, the desktop hasn't it sorted all out. But I don't really mind DnD as long as it's not obtrusive and there are other means to accomplish the task.
- SmellyGeekBoy 7y agoDid you try pressing Ctrl-Z? This has worked in Windows Explorer (and by extension the native File Open dialog) for years.
- dmix 7y agoChrome Canary is currently 79.0. The mainline version is 77. Edit: I wasn't able to reproduce in either, didn't dig into why
- egeozcan 7y agoI 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.
- King-Aaron 7y ago> like right clicking without releasing left mouse button deselects the text since The text selection in the dev tools is woeful as well
- microcolonel 7y ago> 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. For what it's worth, I've found them responsive to my bug reports, and even my feature requests.
- dehrmann 7y ago> I'd still humbly suggest everyone to give Firefox a try. I usually suggest die-hard Chrome users use a plugin to spoof their user agent so product managers and developers are more likely to tread non-Chrome as a first-class browser.
- Waterluvian 7y agoI'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=1001845 https://bugs.chromium.org/p/chromium/issues/detail?id=100184...
- pjmlp 7y agoThat is what happens when the community turns Chrome into the Web, 'cause "Do no evil", "IE sucks" and all of that.
- throwaway_bad 7y agoInteracting with googlers is horrifying. He was ready to commit to the bad decision until he was threatened with a PR disaster of breaking the software used by "hundreds of thousands of school kids". I can't help but think that if a lowly dev like me were to report the issue the "won't fix" would've stuck.
- londons_explore 7y agoThey are very responsive to data. Hundreds of people saying "My app is broken" isn't data. Someone saying "based on a search of the top Alexa 1 million sites, this will affect 8% of users" will catch their attention.
- sunnyps 7y agoAs a Chromium developer speaking based on my observations, we're also responsive to fixing bugs that affect a small percentage of sites. The difference is prioritization, and whether we'll merge fixes back to stable branches for a respin.
- stefan_ 7y agoNo, 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.
- deleted 7y ago[deleted]
- newnewpdro 7y agoI 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.
- cuddlecake 7y agoJust realized that I never use the drag and drop I implemented in my application. Wonder if it actually still works.
- onion2k 7y ago... and this, reader, is why we have end-to-end testing.
- cuddlecake 7y ago¯\_(ツ)_/¯
- mcintyre1994 7y agoProbably 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 7y agoIt 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.
- sgentle 7y agoIf 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#crater https://rust-lang.github.io/rustc-guide/tests/intro.html#cra... And apparently Yocto has something similar: https://lwn.net/Articles/788626/ https://lwn.net/Articles/788626/
- ninju 7y ago>...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.
- greggman2 7y agoWhile 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.
- tiglionabbit 7y agoThe 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.
- wazoox 7y agoFunny, 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?
- bibinou 7y agofixed in 77.0.3865.120
- est 7y agoAfter the Chromium removed chrome://net-internals/, the browser is not worth it anymore.
- Santosh83 7y agoWow, why on earth did they do this!? Are they trying to hobble devs working with their browser?
- shadowgovt 7y agoThere'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.
- uasm 7y ago> "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=1005747 https://bugs.chromium.org/p/chromium/issues/detail?id=100574...) 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?... :\
- deleted 7y ago[deleted]
- asdf12346 7y agoHow is that even possible that bugs like that made it to production? They do not write tests or something?
- shadowgovt 7y agoThe 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 7y agoThe combinatorics were written in code in a human lifetime so there should have been tests for it.
- shadowgovt 7y agoNo, 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.)
- yreg 7y agoI 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 7y ago> 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 7y agoCould 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.
- stefan_ 7y agoLove 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 7y agoThat'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 7y agoIn 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.
- Silhouette 7y agoThe problem is, they should be running in browsers that support standards, and then if one browser doesn't work you just use another one. The monoculture is more of a problem here than having browser-hosted UIs to enterprise software.
- safeplanet-fesa 7y agoJokes 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.
- oldmanthrowit 7y agoWhy 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 7y agoIt's real convenient to have all my browser preferences follow me when I boot up my browser on another computer.
- williamstein 7y agoFor 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=1006243 https://bugs.chromium.org/p/chromium/issues/detail?id=100624... 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 7y agoI 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.
- shadowgovt 7y agoIt looks like they were able to back-port the fix for this into Chrome 77. Hopefully, the issue won't stay live too long.