Hello, How can I catch the onmouseup event outside the ducument - means when the pointer is above window chrome (e.g. toolbar)? Event.observe(document, ''mouseup'', someListener) works only inside the document for me. Thanks in advance for your help! Thomas -- Posted with http://DevLists.com. Sign up and save your mailbox.
Jeremy Kitchen
2006-May-22 00:08 UTC
Re: Catching events outside document (on window chrome)
On Sunday 21 May 2006 11:07, Thomas Anderson wrote:> Hello, > > How can I catch the onmouseup event outside the ducument - means when > the pointer is above window chrome (e.g. toolbar)? > > Event.observe(document, ''mouseup'', someListener) works only inside the > document for me.you can''t. I even tried observing window''s mouseup event and it still only worked inside the viewport. -Jeremy _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Thomas Anderson
2006-May-22 01:37 UTC
Re: [Rails-spinoffs] Catching events outside document (on window chrome)
There must be a way... have a look at demo.script.aculo.us/shop and try to drop some item above the window chrome - it just works there (and I have no idea how is it possible). Anyone can help me explain it? On Sunday, May 21, 2006, at 5:08 PM, Jeremy Kitchen wrote:>On Sunday 21 May 2006 11:07, Thomas Anderson wrote: >> Hello, >> >> How can I catch the onmouseup event outside the ducument - means when >> the pointer is above window chrome (e.g. toolbar)? >> >> Event.observe(document, ''mouseup'', someListener) works only inside the >> document for me. > >you can''t. > >I even tried observing window''s mouseup event and it still only >worked inside >the viewport. > >-Jeremy > > >_______________________________________________ >Rails-spinoffs mailing list >Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >-- Posted with http://DevLists.com. Sign up and save your mailbox.
Michael Daines
2006-May-22 03:51 UTC
Re: Catching events outside document (on window chrome)
> There must be a way... have a look at demo.script.aculo.us/shop and > try > to drop some item above the window chrome - it just works there (and I > have no idea how is it possible). Anyone can help me explain it?On the Mac OS, this works with Safari but not with FireFox. I don''t know what the behaviour is on Windows. (Perhaps that''s what you''re testing with?) The problem is that while there''s certainly a mouseup event happening in the area of the window chrome, it''s "because of" a mousedown event happening in the document area. Perhaps a better question is: what are you trying to do? -- Michael Daines http://www.mdaines.com