OK, so I solved the problem I think. I created a queue called
'dialogue' in the call to Effect.Scroll, and then put the following
code in my Rails application.js file:
Event.observe(window, 'load', function() {
Event.observe($('dialogue_window'), 'click', function()
{ Effect.Queues.get('dialogue').invoke('cancel'); })
Event.observe($('dialogue_window'), 'mousewheel', function()
{ Effect.Queues.get('dialogue').invoke('cancel'); })
Event.observe($('dialogue_window'), 'DOMMouseScroll', function()
{ Effect.Queues.get('dialogue').invoke('cancel'); })
});
This keeps the custom effect and the observer/handler code separate,
which seems right. It also appears to have the desired effect, at
least in FF3. I'll test it in other browsers tomorrow, but before I
do, does this approach seem reasonable?
--
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.