fix mouse events not working in firefox, closes #3