does location of e.preventDefault() matter

No, it doesn’t matter:

This is different from returning false, since when you returns, everything else in the function are abandoned.

As said in the MDC link given above:

Calling preventDefault during any
stage of event flow cancels the event,
meaning that any default action
normally taken by the implementation
as a result of the event will not

Leave a Comment