4 ms·
There you go: https://twitter.com/sephr/status/1286058848063614977 https://twitter.com/sephr/status/1286058848063614977 :) A few months ago I almost rant about
by blaze33 5y ago
There you go: https://twitter.com/sephr/status/1286058848063614977 https://twitter.com/sephr/status/1286058848063614977 :)
A few months ago I almost rant about the same "people also search for" box on twitter but wanted to do my homework first. So I learned about layout shift, how google itself explains it's bad UX, also that it's not a new issue, complaints were made since at least 2019. In above link, Addy Osmani (from Google) replied he submitted an internal bug report to Google search (July 2020). So obviously Google knows about this but somehow decided not to fix the UX.
Nowadays we start having tools to detect and measure layout shift in the browser. So, when it happens that a layout shift replaces the element under the cursor just before a click is triggered, considering the typical reaction time of the user, it's not so hard to imagine what a good browser could do there. If the layout shift was not initiated by the user and we have a click triggered <100ms later, well, most probably they actually wanted to click on the thing that was previously there but that got displaced. But for the browser to notice this it would need some sort of record of the layout changes to know what was where and when. So another way could be to just ignore any user interaction for like, a second, on the elements affected by a layout shift after it happens. Would it be too harsh, break some websites? I don't know but I bet it would prevent a lot of those "misclicks"...
Also, "misclick" sounds like it's a user mistake but at this point I feel more like it's some sort of click hijacking where some js knowingly replaces your click target with another one once it's too late for you to stop your finger to actually trigger the click. There's no guarantee it will work for one specific user, but at scale, well, do some A/B testing to measure the average time to click on A and then setup B to replace the expected link target 50ms before to the average click happens, done! Pretty sure it wouldn't be so hard to optimize ;) (Ethical you say? Shuuuush!)