TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Pointing the Way Forward

96 pointsby sagadotworldover 8 years ago

6 comments

niftichover 8 years ago
Finally!<p>&#x27;Pointer events&#x27; originated at Microsoft, after the W3C effort to standardize Apple&#x27;s &#x27;Touch events&#x27; became uncertain due to patent issues. For a while, despite admitting it&#x27;s a more elegant spec for unified input, Google were reluctant to add it because Apple wasn&#x27;t interested [1][2].<p>Now Google have changed their mind once more and shipped this, making Apple the only major outlier. The pains of shimming these similar-but-different APIs will continue for a bit, but hopefully Apple will make this concession in the end.<p>[1] <a href="https:&#x2F;&#x2F;timkadlec.com&#x2F;2015&#x2F;02&#x2F;apples-web&#x2F;" rel="nofollow">https:&#x2F;&#x2F;timkadlec.com&#x2F;2015&#x2F;02&#x2F;apples-web&#x2F;</a><p>[2] <a href="https:&#x2F;&#x2F;mobiforge.com&#x2F;news-comment&#x2F;who-wants-pointer-events-api-everyone-nearly" rel="nofollow">https:&#x2F;&#x2F;mobiforge.com&#x2F;news-comment&#x2F;who-wants-pointer-events-...</a>
评论 #12761640 未加载
评论 #12761970 未加载
pimlottcover 8 years ago
&gt; Ever spent a frustrating hour debugging a broken mouseup event, until you realised that it’s because the user is letting go of the button outside your click target? No? Okay, maybe it’s just me, then.<p>I hope no one uses this example to make an onClick action that works no matter where the pointer is when the button is released. The correct behavior when this happens is to ignore the click when the user has moved off the click target when the button is released. It&#x27;s a pretty handy convention, as it&#x27;s the only way to for a user to &quot;abort&quot; a click once they start it - something I&#x27;ve done a few times myself.<p>This example pattern could be useful, though, in managing the UI state when something like this occurs.
评论 #12767111 未加载
Analemma_over 8 years ago
I was one of the people who was really raging at Google when they announced that Chrome wouldn&#x27;t support PE (with that infamous &quot;No argument that PE is more elegant&quot; comment), so it&#x27;s only fair that I thank them sincerely for them doing the right thing and making a 180 on this. Good job.
riskableover 8 years ago
In anticipation of this day I added support for PointerEvents to HumanInput months ago:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;liftoff&#x2F;HumanInput" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;liftoff&#x2F;HumanInput</a><p>It really is a superior way to handle mouse and touch (and stylus!) events. If you look at pointer.js in the repo you can see how much simpler it is to handle PointerEvents VS the combination of traditional mouse and touch events.
DubiousPusherover 8 years ago
Back in 2012 with the roll out of the Surface, we wrote our own translation layer to handle unifying mouse+touch input for a game we were working on that never made it to launch.<p>It&#x27;s one of those things you just shouldn&#x27;t have to write. This probably makes a lot of web devs very happy.
stoikertyover 8 years ago
It&#x27;s hard to describe just how happy I am to see this! Plus they gave us a free polyfill. f&#x27;ing awesome