Fix Firefox bug on submit function not preventing the default submitting action