Forums
View unanswered posts | View active topics It is currently Wed Oct 01, 2014 4:19 pm



Reply to topic  [ 2 posts ] 
 Bug in addHoverClass 
Author Message

Joined: Mon Nov 29, 2010 3:46 am
Posts: 2
Post Bug in addHoverClass
Hi Jason,

I've come across an intermittant bug in the addHoverClass method. I've picked up in some instances 'el' is null which causes addHoverClass to throw an error. I'm not sure what causes this but by applying the following change I have fixed the problem and there doesn't seem to be any side effects:

Code:
function addHoverClass() {
        // Check if el is not null before adding the hoverClass
        if (el) el.className += hoverClass;
}


Unfortunately, the code where the bug arose is too convoluted to post here but essentially it is a single tier suckerfish menu contained within a RUZEE.LayoutManager framework (http://www.ruzee.com/blog/ruzeelayoutmanager/). The net result is a "ribbon strip" similar to the one in MS Office 2007. PIE is added to the hover effect to make the LI elements look rounded.

Thanks
David


Tue Dec 14, 2010 2:32 am
Profile

Joined: Wed Jul 14, 2010 11:46 am
Posts: 1443
Post Re: Bug in addHoverClass
Thanks very much for pointing this out. It actually makes sense now that I think about it; since addHoverClass is called after a short timeout after the mouseenter event, it's possible that the destroy method might be called between the mouseenter event and when the timeout completes, which would cause the el variable to be null.

I'll commit your fix asap. Thanks again.


Tue Dec 14, 2010 9:44 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: Bing [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.