Walter Lee Davis
2008-Mar-07 14:55 UTC
mouseover / mouseout being triggered by table elements
I have a set of observers applied to a div to make a child of that div (a close box) appear or disappear when the parent div is moused over/out. I am seeing some very odd behavior and I am not sure where to start looking for clues. I''m using the latest Prototype and Scriptaculous. An absolutely positioned DIV contains an inline table and a child absolutely positioned div containing the close button. The close button is set to appear when the parent DIV is moused over, and it does. The close button is set to disappear when you mouse out of the parent DIV. Unfortunately, the mouseover / out event fires every time you cross any sort of child content boundaries. So in this case, it fires when you move over one cell or another in the table, or when you cross one of the paragraphs inside one of the table cells. So the close box appears and disappears with sickening frequency. Does this ring a bell for anyone? I have tried a whole lot of different approaches to fix this, but nothing seems to work. Walter --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Walter, take a look at this patch - it should solve your problem http://dev.rubyonrails.org/ticket/8354 - kangax On Mar 7, 9:55 am, Walter Lee Davis <wa...-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote:> I have a set of observers applied to a div to make a child of that > div (a close box) appear or disappear when the parent div is moused > over/out. I am seeing some very odd behavior and I am not sure where > to start looking for clues. > > I''m using the latest Prototype and Scriptaculous. > > An absolutely positioned DIV contains an inline table and a child > absolutely positioned div containing the close button. The close > button is set to appear when the parent DIV is moused over, and it > does. The close button is set to disappear when you mouse out of the > parent DIV. > > Unfortunately, the mouseover / out event fires every time you cross > any sort of child content boundaries. So in this case, it fires when > you move over one cell or another in the table, or when you cross one > of the paragraphs inside one of the table cells. So the close box > appears and disappears with sickening frequency. > > Does this ring a bell for anyone? I have tried a whole lot of > different approaches to fix this, but nothing seems to work. > > Walter--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
T.J. Crowder
2008-Mar-08 11:58 UTC
Re: mouseover / mouseout being triggered by table elements
Kangax, V. cool. (And I may have to put this on my calendar: Something that IE does that''s so handy it''s worth emulating in other browsers! Kind of like 1999''s XHR all over again. So that''s twice, then.) Any idea when this will go into core? Seems like it was done and well- received before the 1.6 release, and a diff was created for RC1, but it doesn''t seem to have made it into the official release... -- T.J. Crowder tj / crowder software / com On Mar 7, 7:37 pm, kangax <kan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Walter, > > take a look at this patch - it should solve your problemhttp://dev.rubyonrails.org/ticket/8354 > > - kangax > > On Mar 7, 9:55 am, Walter Lee Davis <wa...-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote: > > > I have a set of observers applied to a div to make a child of that > > div (a close box) appear or disappear when the parent div is moused > > over/out. I am seeing some very odd behavior and I am not sure where > > to start looking for clues. > > > I''m using the latest Prototype and Scriptaculous. > > > An absolutely positioned DIV contains an inline table and a child > > absolutely positioned div containing the close button. The close > > button is set to appear when the parent DIV is moused over, and it > > does. The close button is set to disappear when you mouse out of the > > parent DIV. > > > Unfortunately, the mouseover / out event fires every time you cross > > any sort of child content boundaries. So in this case, it fires when > > you move over one cell or another in the table, or when you cross one > > of the paragraphs inside one of the table cells. So the close box > > appears and disappears with sickening frequency. > > > Does this ring a bell for anyone? I have tried a whole lot of > > different approaches to fix this, but nothing seems to work. > > > Walter--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Ken Snyder
2008-Mar-08 20:04 UTC
Re: mouseover / mouseout being triggered by table elements
On 3/8/08, T.J. Crowder <tjcrowder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> ... > > Any idea when this will go into core? Seems like it was done and well- > received before the 1.6 release, and a diff was created for RC1, but > it doesn''t seem to have made it into the official release... > -- > T.J. CrowderIt wouldn''t hurt to bump the topic on the Prototype-core list. :) I remember a conversation a while back about mousewheel and mouseenter/leave where the core members indicated that such support is probably better left to plugins. If so, I''d like to see such plugins officially endorsed, especially when it is not obvious to the average user how to augment the 1.6 Event system to add these types of features. - Ken Snyder --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Andrew Dupont
2008-Mar-08 20:25 UTC
Re: mouseover / mouseout being triggered by table elements
On Mar 8, 2:04 pm, "Ken Snyder" <kendsny...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I remember a conversation a while back about mousewheel and > mouseenter/leave where the core members indicated that such support is > probably better left to plugins. If so, I''d like to see such plugins > officially endorsed, especially when it is not obvious to the average > user how to augment the 1.6 Event system to add these types of > features.The whole idea of plugins/add-on scripts is something we need to spend more time on, by my own admission. In the meantime, you''ve reminded me that I never posted my "official" solution to generating custom mouse:enter and mouse:leave events. Here it is [1]. (Warning: untested and written off the top of my head as I sit on a couch at SXSW.) And the mouse:wheel example can be found on my weblog [2]. If someone wants to merge the two scripts and submit the result to Scripteka, feel free. ;-) [1] http://pastie.caboo.se/163335 [2] http://andrewdupont.net/2007/11/07/pseudo-custom-events-in-prototype-16/ Cheers, Andrew --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
We created scripteka to make it easy to find scripts scattered all over the web. One thing we didn''t account for is a quality of extensions - from 100 (currently published) scripts only 5-6 (!!!) have unit tests. I sometimes have to reject a submitted script just because it''s quality is clearly doubtful. Moreover, some people don''t feel like submitting a 10 line snippet. Does anyone else find it obvious that we need an *official* set of extensions? There are many things we simply can''t put into a core. That doesn''t mean we can''t release an official extension with unit tests, versioned in a trunk. Even small things like mouse:wheel could make a huge difference. Best, kangax On Mar 8, 3:25 pm, Andrew Dupont <goo...-TiabPMV39B5K4mp1Ns0Z8Q@public.gmane.org> wrote:> On Mar 8, 2:04 pm, "Ken Snyder" <kendsny...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I remember a conversation a while back about mousewheel and > > mouseenter/leave where the core members indicated that such support is > > probably better left to plugins. If so, I''d like to see such plugins > > officially endorsed, especially when it is not obvious to the average > > user how to augment the 1.6 Event system to add these types of > > features. > > The whole idea of plugins/add-on scripts is something we need to spend > more time on, by my own admission. > > In the meantime, you''ve reminded me that I never posted my "official" > solution to generating custom mouse:enter and mouse:leave events. Here > it is [1]. (Warning: untested and written off the top of my head as I > sit on a couch at SXSW.) And the mouse:wheel example can be found on > my weblog [2]. > > If someone wants to merge the two scripts and submit the result to > Scripteka, feel free. ;-) > > [1]http://pastie.caboo.se/163335 > [2]http://andrewdupont.net/2007/11/07/pseudo-custom-events-in-prototype-16/ > > Cheers, > Andrew--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Ken Snyder
2008-Mar-09 03:15 UTC
Re: mouseover / mouseout being triggered by table elements
On 3/8/08, Andrew Dupont <google-TiabPMV39B5K4mp1Ns0Z8Q@public.gmane.org> wrote:> ... > [1] http://pastie.caboo.se/163335 > [2] http://andrewdupont.net/2007/11/07/pseudo-custom-events-in-prototype-16/Awesome! Thanks for your work on this! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
T.J. Crowder
2008-Mar-09 08:55 UTC
Re: mouseover / mouseout being triggered by table elements
Kangax, +1 on an official extensions site, perhaps this conversation _should_ move to core. :) Meanwhile, thank you for Scripteka! -- T.J. Crowder tj / crowder software / com On Mar 9, 2:55 am, kangax <kan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> We created scripteka to make it easy to find scripts scattered all > over the web. One thing we didn''t account for is a quality of > extensions - from 100 (currently published) scripts only 5-6 (!!!) > have unit tests. I sometimes have to reject a submitted script just > because it''s quality is clearly doubtful. Moreover, some people don''t > feel like submitting a 10 line snippet. > > Does anyone else find it obvious that we need an *official* set of > extensions? There are many things we simply can''t put into a core. > That doesn''t mean we can''t release an official extension with unit > tests, versioned in a trunk. Even small things like mouse:wheel could > make a huge difference. > > Best, > kangax > > On Mar 8, 3:25 pm, Andrew Dupont <goo...-TiabPMV39B5K4mp1Ns0Z8Q@public.gmane.org> wrote: > > > On Mar 8, 2:04 pm, "Ken Snyder" <kendsny...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > I remember a conversation a while back about mousewheel and > > > mouseenter/leave where the core members indicated that such support is > > > probably better left to plugins. If so, I''d like to see such plugins > > > officially endorsed, especially when it is not obvious to the average > > > user how to augment the 1.6 Event system to add these types of > > > features. > > > The whole idea of plugins/add-on scripts is something we need to spend > > more time on, by my own admission. > > > In the meantime, you''ve reminded me that I never posted my "official" > > solution to generating custom mouse:enter and mouse:leave events. Here > > it is [1]. (Warning: untested and written off the top of my head as I > > sit on a couch at SXSW.) And the mouse:wheel example can be found on > > my weblog [2]. > > > If someone wants to merge the two scripts and submit the result to > > Scripteka, feel free. ;-) > > > [1]http://pastie.caboo.se/163335 > > [2]http://andrewdupont.net/2007/11/07/pseudo-custom-events-in-prototype-16/ > > > Cheers, > > Andrew--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Ken Snyder
2008-Mar-10 04:49 UTC
Re: mouseover / mouseout being triggered by table elements
On 3/8/08, kangax <kangax-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> ... > > Does anyone else find it obvious that we need an *official* set of > extensions? There are many things we simply can''t put into a core. > That doesn''t mean we can''t release an official extension with unit > tests, versioned in a trunk. Even small things like mouse:wheel could > make a huge difference. > > Best, > kangaxRight on point. I absolutely love scripteka and am very grateful about all your gracious hard work there! It is an excellent forum for sharing code and finding helpful and exciting scripts. It really doesn''t bother me that most scripts there do not have unit tests; as has been mentioned recently in the Prototype vs. jQuery discussion, Prototype''s is more of build-an-application library than download-a-mismash-of-widgets library. So I''m not disappointed if a scripteka script doesn''t work 100% because I''m not building a site with a bunch of widgets, I''m building an application. Like you say, it would make a big difference to add extensions to the official svn repository. I envision two types of scripts that could be included as "official" extensions: 1) those that barely missed the cut to get into core (e.g. mouse:wheel/enter/leave) and 2) those found in other popular js libraries that are outside Prototype''s scope (e.g. date functions, browser version detection, hover/toggle helpers, ajax history management etc.). Thanks! Ken --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---