[Project_owners] Blocking "Backmenu"

Paradox paradox5555 at hotmail.com
Tue Sep 9 11:27:24 EDT 2003


Clav was nice enough to help me out with using eventlisteners to 
intercept clicks on the back/foward history dropdowns. Now that I know 
there are actually two different menus I'm almost ready to implement 
dropdown support in my extension. But I'm  having a problem with 
"backMenu" and "forwardMenu." Namely I can detect and process clicks 
on these two targets, but I can't seem to stop the browser default 
behavior. If I do something like this:

document.getElementById("backMenu").addEventListener('click', 
function(event) {alert('test message'); event.preventBubble();}, 
false);

Then it properly registered and displays the test message, but 
preventBubble does not stop the default action of the dropdown. I've 
also tried event.stopPropagation(), event.preventDefault(), and 
event.preventCapture(), but nothing seems to prevent the browser from 
going to the clicked history entry. Any advice here? I suppose I could 
try to overlay that dropdown itself to prevent it from doing anything 
on middle click/ctrl click and then just pick it up using my working 
eventhandler, but it seems sloppy to do it that way and it would add 
an unnecessary overlay. 






More information about the Project_owners mailing list