6 ms·
Pointer Events Now in Firefox Nightly
- mozumder 11y agoI really don't like the idea of a common pointer event. Mouse interaction and touch interaction are as different as mouse interaction and keyboard interaction. They really do need to be treated completely differently, with different user experience models and code paths.
- jfoster 11y agoFor some applications you'll be absolutely correct, but there are also applications where they do the exact same thing. Consider the case of panning a map, for example. My understanding is that this is in addition to the existing mouse & touch APIs, so developers can just use whatever makes sense for their application.
- glandium 11y agoIt's a common interface, but you can still distinguish which of multiple devices triggered the event (with pointerId) and distinguish what type of device it was (with pointerType, which can have values "pen", "touch" or "mouse").
- pdkl95 11y agoWhat makes you think this is limited to only mouse vs touch? By design the HTML+CSS+DOM platform only provides an abstraction that may or may not have a meaningful mapping to the actual interface of the User Agent. You really shouldn't be assuming you know anything about the interface and only use pointer events in the most minimal, generic way possible. To that end, this new "pointer event" may be useful. If you want better, more detailed pointer information, you should use a platform that provides it such as writing a native app. /* the same goes for reimplementing widgets like scrollbars: don't, that's the job of the User Agent */
- mozumder 11y agoThis is dangerous, because you have to design for use model, not a generic model. If you design for a generic model, you're going to end up with a crappy interface.
- nindalf 11y agoAvailable in IE11, Edge and Firefox for now - http://caniuse.com/#feat=pointer http://caniuse.com/#feat=pointer
- userbinator 11y agopointermove "The page at xxxxx would like to track the movements of your mouse pointer. Do you wish to allow this action?" I wonder how many pages are doing this already without their users noticing...
- tenfingers 11y agoPrecisely. I actually don't see the point in asking the user unless regular events _also_ get disabled.
- anon4 11y agoReminds me of the old Win 95 joke: ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ You have moved the mouse pointer ┃ ┃ ┃ ┃ Windows will have to restart to ┃ ┃ apply this change ┃ ┃ ┃ ┃ [OK] ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
- justwannasing 11y agoWait! Did they fix that in Windows 10?
- jasonkester 11y agoI often wonder if browser vendors, or anybody really, believes that this sort of thing makes our world better. All it does is add a third case that every application needs to support from here on out. You need to do your sniffing, then register mouse events or touch events or pointer events as necessary. And write similar but different code paths for each case. And you need to maintain and test all three of those branches for ever. It's that XKCD comic. And that Joel blog post from fifteen years ago. Implemented with no irony whatsoever by people who seem not to have read either.
- eterm 11y agoHow about you link which xkcd [0] comic and Joel [1] blog post you're talking about rather than assuming we know. [0] It's not capitalised [1] Spolsky, I assume.
- jasonkester 11y agoSorry about that. I expected that the Internet would have sorted that out for me by now. Googling: https://xkcd.com/927/ https://xkcd.com/927/ http://www.joelonsoftware.com/items/2008/03/17.html http://www.joelonsoftware.com/items/2008/03/17.html
- DiThi 11y agoJoel's article is barely relevant now. The main problem has been layout discrepancies, and the pages were made for IE+others back then. Nowadays it's very difficult to step on something not properly supported in your target browsers (except if your target includes old versions of IE). I develop exclusively on Chrome with a lot of fancy HTML5 stuff and very rarely I have to tweak something for Firefox, IE11, Safari, Opera... It's a completely different scenario than when I did web dev in 2008. Also, Joel article is not fifteen years old, it's nine.
- jasonkester 11y agoSounds like you're not pushing things as much as you used to in '08. The situation is no different today than it was in 1996 when I started this ride. There are sections of my current codebase that switch for iOS 4, 6, 7, 8+, android and desktop Chrome, working around idiosyncracies of each. There's also IE, Firefox and "am I running from the local filesystem" checks in there. All necessary to work around real differences in implementation in the most current crop of "modern" browsers. It's a rare feature that I can ship that works out of the box in every browser. But, as it was 20 years ago, this is the job we signed up for. I just wish people stopped going out of their way to add more unnecessary things that I need to special case around.
- adamzubi700 11y agohttp://googler700.blogspot.com/ http://googler700.blogspot.com/
- jbrantly 11y agoI'm apparently a bit outdated, but it seems that Chrome is also now planning on implementing pointer events [0] after saying they wouldn't. Does anyone know if webkit has budged on their stance? [0] https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/ODWmcKNQl0I https://groups.google.com/a/chromium.org/forum/#!topic/blink...