Re: Pointer Events and click

On 12/03/2012 03:10 PM, Scott González wrote:
> On Sun, Dec 2, 2012 at 6:27 PM, Jacob Rossi <Jacob.Rossi@microsoft.com <mailto:Jacob.Rossi@microsoft.com>> wrote:
>
>     " There are cases in which a developer would want to conditionally react to a click based on pointer movement" sounds to me like the uses cases
>     delve into gesture recognition, which is out of scope for our charter.
>
>
> I don't have a major concern either way, but I just wanted to note a case in jQuery UI where we care about conditionally forcing a click based on
> pointer movement, but we don't actually care about gestures. We have a button widget which can build on top of various markup. When applied to a
> checkbox or radio, we visually hide the form control and style the label. Browsers generally have some tolerance for movement during a click. At least
> in Firefox, there is a noticeable difference in the tolerance allowed when clicking on a checkbox vs. clicking on a label associated with a checkbox.

FYI, in Gecko it is all about the target of the mousedown and up. They must be the same element (per DOM 3 Events).



> This is likely to make text selection of the label prevent toggling the checkbox. However, since we're treating the label as a button, we're not
> concerned with text selection and would like the larger movement tolerance that comes with the form control itself. The only way to work around this
> is to listen to mousedown/up and then check if a click or change event occurred on the checkbook and if not manufacture one.
>
> I believe this is the only place in jQuery UI where we conditionally care about clicks based on movement, so I don't have strong feelings either way.
> I do agree with everything else Jacob has said. In general, I don't think we should use "developers are familiar with X from Touch Events" as a strong
> argument for anything in Pointer Events as the majority of developers are not familiar with Touch Events and many that are familiar with them have
> complaints about them.

Received on Tuesday, 4 December 2012 15:23:56 UTC