Fix event.preventDefault issue on firefox