[Proto-Scripty] Re: event.observe document
On Dec 16 2008, 12:23 am, "Gabriel Gilini" wrote: > Since he probably has to watch a group of inputs, observing the document is > obviously the better choice. > Event propagation isn't a bad thing at all. I think that what Matt has in mind was observing the document and use propagation in order to have key shortcuts working almost everywhere, and observing the inputs where shortcuts are not supposed to be enabled with a handler that stop propagation to the document. Both solutions seems equally elegant to me, but I am not an expert :o) Eric > > On Mon, Dec 15, 2008 at 2:08 PM, Matt Foster wrote: > > > You could also listen to those events on the input, and stop their > > propagation so that the document never hears of them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: event.observe document
Since he probably has to watch a group of inputs, observing the document is obviously the better choice. Event propagation isn't a bad thing at all. Gabriel Gilini www.usosim.com.br gabr...@usosim.com.br gabr...@souagil.com.br On Mon, Dec 15, 2008 at 2:08 PM, Matt Foster wrote: > > You could also listen to those events on the input, and stop their > propagation so that the document never hears of them. > > > > > On Dec 15, 7:06 am, Stucture_Ulf > wrote: > > Great, I got it! Many thanks. > > > > On Dec 15, 12:35 am, "Gabriel Gilini" wrote: > > > > > Use the Event.element method to find out who triggered the event, then > check > > > if you want to do your stuff or not. > > > Gabriel Gilini > > > > >www.usosim.com.br > > > gabr...@usosim.com.br > > > gabr...@souagil.com.br > > > > > On Sun, Dec 14, 2008 at 3:37 PM, Stucture_Ulf < > > > > > maximilian.moulet...@gmail.com> wrote: > > > > > > I'm using keyboard short cuts with Event.observe "document". I do not > > > > want these to be activated when using certain input fields on the > > > > site. So my question is how I temporarily disable these document > > > > shortcuts when these input fields are in focus.grateful for tips. > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: event.observe document
You could also listen to those events on the input, and stop their propagation so that the document never hears of them. On Dec 15, 7:06 am, Stucture_Ulf wrote: > Great, I got it! Many thanks. > > On Dec 15, 12:35 am, "Gabriel Gilini" wrote: > > > Use the Event.element method to find out who triggered the event, then check > > if you want to do your stuff or not. > > Gabriel Gilini > > >www.usosim.com.br > > gabr...@usosim.com.br > > gabr...@souagil.com.br > > > On Sun, Dec 14, 2008 at 3:37 PM, Stucture_Ulf < > > > maximilian.moulet...@gmail.com> wrote: > > > > I'm using keyboard short cuts with Event.observe "document". I do not > > > want these to be activated when using certain input fields on the > > > site. So my question is how I temporarily disable these document > > > shortcuts when these input fields are in focus.grateful for tips. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: event.observe document
Great, I got it! Many thanks. On Dec 15, 12:35 am, "Gabriel Gilini" wrote: > Use the Event.element method to find out who triggered the event, then check > if you want to do your stuff or not. > Gabriel Gilini > > www.usosim.com.br > gabr...@usosim.com.br > gabr...@souagil.com.br > > On Sun, Dec 14, 2008 at 3:37 PM, Stucture_Ulf < > > maximilian.moulet...@gmail.com> wrote: > > > I'm using keyboard short cuts with Event.observe "document". I do not > > want these to be activated when using certain input fields on the > > site. So my question is how I temporarily disable these document > > shortcuts when these input fields are in focus.grateful for tips. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: event.observe document
Use the Event.element method to find out who triggered the event, then check if you want to do your stuff or not. Gabriel Gilini www.usosim.com.br gabr...@usosim.com.br gabr...@souagil.com.br On Sun, Dec 14, 2008 at 3:37 PM, Stucture_Ulf < maximilian.moulet...@gmail.com> wrote: > > I'm using keyboard short cuts with Event.observe "document". I do not > want these to be activated when using certain input fields on the > site. So my question is how I temporarily disable these document > shortcuts when these input fields are in focus.grateful for tips. > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---