- From: Brandon Jones <bajones@google.com>
- Date: Sun, 23 Feb 2014 07:18:24 -0800
- To: Florian Bösch <pyalot@gmail.com>
- Cc: Ian Langworth <ian@artillery.com>, Webapps WG <public-webapps@w3.org>, Thibaut Despoulain <thibaut@artillery.com>
- Message-ID: <CAEGwwi1DCX322fadj1cDaCW=eGyK6dsg6LbR6YZW-_HOnEOdkg@mail.gmail.com>
Several points to add: - it's possible to theme the OS cursor using custom images with CSS. https://developer.mozilla.org/en-US/docs/Web/CSS/cursor/url - The reason the cursor is hidden when the pointer is locked is that some OSes don't have the ability to report relative mouse movement correctly at screen edges. This requires the cursors to constantly be reset to the center of the screen, which obviously would look strange if the cursor was visible. - You already mentioned some issues with synthetic mouse events, but unfortunately it's worse than you suspect. For example: sending a synthetic click event to a checkbox doesn't actually change it's checked state. (Not the last time I tried anyway) select controls also have a hard time with synthetic events, and there's a whole host of other sub rely broken things. :( Thanks for the tests! On Sunday, February 23, 2014, Florian Bösch <pyalot@gmail.com> wrote: > On Sun, Feb 23, 2014 at 9:55 AM, Florian Bösch <pyalot@gmail.com<javascript:_e(%7B%7D,'cvml','pyalot@gmail.com');> > > wrote: > >> >>> - Inability to use DOM elements with mouse events for a game >>> overlay/HUD. >>> >>> The test I've written here >> http://codeflow.org/issues/software-cursor.html also tests mouse event >> synthesis (as hinted at by an example in the pointerlock spec) and it works >> satisfactory in chrome and firefox on linux. To get all subtleties right >> one would also have to do most other mouse events I guess (mouseover, >> mouseout, mousemove etc.). >> > > I did some more testing on this. Synthetic mouse events are limited in > that they cannot trigger some state like hover styles. Other things like > focus/blur require special handling. It's also left to the synthetic event > creator to synthesize compound events like over/out/enter/leave and their > semantic as supplying the primitive mouse events (click, mousemove) doesn't > automatically synthesize the others. >
Received on Sunday, 23 February 2014 15:18:51 UTC