Cheto I do not catch up how to stop popup for FF

function alllclose() { var els = document.getElementsByClassName('okno'); for( var i=0; i<els.length; ++i ) { els[i].style.display = 'none'; } stop_bubbling(event); }; function stop_bubbling(e) { if (e && e.stopPropagation) //если метод stopPropagation поддерживается e.stopPropagation() else event.cancelBubble=true } 

works everywhere except ff

  • in the stop_bubbling function add more e.cancelBubble = true - Alex Kapustin
  • everywhere I added ... nifika ... if it is not difficult how this function should look? - Nuboyd
  • one
    > Use event.stopPropagation () instead of this non-standard method. - karmadro4
  • how exactly ... I try to fail - Nuboyd
  • @ustal, DON'T FORGET! If you are given an exhaustive answer, mark it as correct (click on the check mark next to the selected answer). @ Ustal; If you are given an exhaustive answer, mark it as correct (click on the check mark next to the selected answer). - Rules

1 answer 1

If I do not confuse anything, then it should be like this:

 e.onselectstart=false; //Запрещяет выделение