added code to make Firefox mouse events work