From b3053c4b0f2969846df1f8b1320e969f6418fe3c Mon Sep 17 00:00:00 2001 From: AurelioAHeckert Date: Sat, 9 Feb 2008 22:34:44 +0000 Subject: [PATCH] ActionItem152: baixando a dependencia de prototype para o IEca --- public/javascripts/menu.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/public/javascripts/menu.js b/public/javascripts/menu.js index 4492482..d122627 100644 --- a/public/javascripts/menu.js +++ b/public/javascripts/menu.js @@ -6,6 +6,7 @@ function prepareMenu(id, options) { // add a class for work arround msie's css bugs $(id).className += " msie"; } + $(id).className += " menuRoot"; var zIndex = 10; @@ -87,18 +88,24 @@ function prepareMenu(id, options) { // MS IE sucks, BTW. if ( document.all ) { function forceUlFocusFromLink ( a ) { - var stop = false; + /*var stop = false; a.ancestors().each( function(el) { if ( el.id == "menu" ) { stop = true } if ( ! stop && el.onfocus ) { el.onfocus() } - } ); + } );*/ + var el = a.parentNode; + while ( / menuRoot/.test(el.className) ) el = el.parentNode; + if ( el.onfocus ) { el.onfocus() } } function forceUlBlurFromLink ( a ) { - var stop = false; + /*var stop = false; a.ancestors().each( function(el) { if ( el.id == "menu" ) { stop = true } if ( ! stop && el.onblur ) { el.onblur() } - } ); + } );*/ + var el = a.parentNode; + while ( / menuRoot/.test(el.className) ) el = el.parentNode; + if ( el.onblur ) { el.onblur() } } $$("#" + id + " ul ul a").each( function( a ) { // os links do sub menu forçarão o foco do ul -- libgit2 0.21.2