Re: Should event and accessKey timing respect preventDefault?
Rick <[email protected]> Fri, 27 Aug 2010 18:27:58 -0400
| Newsgroups | gmane.comp.web.svg,gmane.comp.web.smil |
|---|---|
| Message-ID | <[email protected]> |
--0016e6d27d3d76fec6048ed5a043 Content-Type: text/plain; charset=ISO-8859-1 I'll inject use cases, hopefully for clarity. If you intercept an F5 and you don''t want the browser to perform a refresh, you call preventDefault() If you intercept a right click and you don't want the browser to pop up a menu, perhaps you want to do it yourself, you call preventDefault() I haven't worked with SMIL since I was on the group, I hope to change that soon. That experience is too foggy for me to give a useful comment. I hope the use cases help. On Fri, Aug 27, 2010 at 11:59 AM, <[email protected]> wrote: > I think I agree with Jack. IIRC, the behavior Brian describes might be > appropriate after a cancelPropagate() call, but not after preventDefault(). > Apologies if I have the method names wrong - am citing from memory. > > Patrick > > -----Original Message----- > From: Jack Jansen <[email protected]> > Sender: [email protected] > Date: Fri, 27 Aug 2010 09:43:24 > To: Brian Birtles<[email protected]> > Cc: <[email protected]>; www-svg<[email protected]> > Subject: Re: Should event and accessKey timing respect preventDefault? > > > On 27 aug 2010, at 04:37, Brian Birtles wrote: > > > (Cross-posting to www-smil and www-svg since although this is a SMIL > > issue it is probably recently of more concern to SVG implementers and > > authors.) > > > > Dear all, > > > > SMIL as incorporated in SVG allows for animations to be keyed off > > various DOM events such as mouse clicks (event timing) as well as > > keyboard inputs (accessKey timing). > > > > One area that would benefit from clarification is whether animations > > should be triggered when preventDefault is called on the event in > > question (and presuming that event is cancelable). > > > I haven't looked closely at preventDefault (up until 2 minutes ago:-), but > my impression is that it it should the opposite from what you suggest. > You seem to suggest > someone calls event->preventDefault(), therefore the default action for > the event on its target node doesn't happen. > > My understanding is > if the event comes in, and the target node decides not to take the default > action for some reason, then it should also call event->preventDefault(). > > If my understanding is correct then I think there is no issue. Otherwise, > could you point me to some references? > -- > Jack Jansen, <[email protected]>, http://www.cwi.nl/~jack<http://www.cwi.nl/%7Ejack> > If I can't dance I don't want to be part of your revolution -- Emma Goldman > > > > > -- Cheers! Rick --0016e6d27d3d76fec6048ed5a043 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <br> I'll inject use cases, hopefully for clarity.<br> <br> If you intercept an F5 and you don''t want the browser to perform a= refresh, you call preventDefault()<br> <br> If you intercept a right click and you don't want the browser to pop up= a menu, perhaps you want to do it yourself, you call preventDefault()<br> <br> I haven't worked with SMIL since I was on the group, I hope to change= =20 that soon.=A0 That experience is too foggy for me to give a useful=20 comment.=A0 I hope the use cases help.<br><br><div class=3D"gmail_quote">On= Fri, Aug 27, 2010 at 11:59 AM, <span dir=3D"ltr"><<a href=3D"mailto:co= [email protected]">[email protected]</a>></span> wrote:<br><blockquote c= lass=3D"gmail_quote" style=3D"margin: 0pt 0pt 0pt 0.8ex; border-left: 1px s= olid rgb(204, 204, 204); padding-left: 1ex;"> I think I agree with Jack. IIRC, the behavior Brian describes might be appr= opriate after a cancelPropagate() call, but not after preventDefault(). Apo= logies if I have the method names wrong - am citing from memory.<br> <br> Patrick<br> <div><div></div><div class=3D"h5"><br> -----Original Message-----<br> From: Jack Jansen <<a href=3D"mailto:[email protected]">Jack.Jansen@cwi= .nl</a>><br> Sender: <a href=3D"mailto:[email protected]">[email protected]<= /a><br> Date: Fri, 27 Aug 2010 09:43:24<br> To: Brian Birtles<<a href=3D"mailto:[email protected]">[email protected]= </a>><br> Cc: <<a href=3D"mailto:[email protected]">[email protected]</a>>; www-svg= <<a href=3D"mailto:[email protected]">[email protected]</a>><br> Subject: Re: Should event and accessKey timing respect preventDefault?<br> <br> <br> On 27 aug 2010, at 04:37, Brian Birtles wrote:<br> <br> > (Cross-posting to www-smil and www-svg since although this is a SMIL<b= r> > issue it is probably recently of more concern to SVG implementers and<= br> > authors.)<br> ><br> > Dear all,<br> ><br> > SMIL as incorporated in SVG allows for animations to be keyed off<br> > various DOM events such as mouse clicks (event timing) as well as<br> > keyboard inputs (accessKey timing).<br> ><br> > One area that would benefit from clarification is whether animations<b= r> > should be triggered when preventDefault is called on the event in<br> > question (and presuming that event is cancelable).<br> <br> <br> I haven't looked closely at preventDefault (up until 2 minutes ago:-), = but my impression is that it it should the opposite from what you suggest.<= br> You seem to suggest<br> =A0 =A0someone calls event->preventDefault(), therefore the default act= ion for the event on its target node doesn't happen.<br> <br> My understanding is<br> =A0if the event comes in, and the target node decides not to take the defa= ult action for some reason, then it should also call event->preventDefau= lt().<br> <br> If my understanding is correct then I think there is no issue. Otherwise, c= ould you point me to some references?<br> --<br> Jack Jansen, <<a href=3D"mailto:[email protected]">[email protected]</= a>>, <a href=3D"http://www.cwi.nl/%7Ejack" target=3D"_blank">http://www.= cwi.nl/~jack</a><br> If I can't dance I don't want to be part of your revolution -- Emma= Goldman<br> <br> <br> <br> <br> </div></div></blockquote></div><br><br clear=3D"all"><br>-- <br>Cheers!<br>= Rick<br> --0016e6d27d3d76fec6048ed5a043--