Use preventDefault properly.