When click event is fired with "right button" it is not caught by "else if" in in the "select" function. Most annoying thing is that it is caught in any other sample pages that I made earlier. Please help me in debugging this problem.
document.addEventListener('click' ,this.select.bind(this) ,false);
Filesystem.prototype.select = function(event){
if(event.button === 0){
// Code that's working fine
}
else if(event.button === 2){
alert("hello");
}
}