Furthermore, this strange behavior only happens in Chrome. In IE8 and greater, the code executes just fine when opening the form, without need to "Edit Page".
Is there a way to force it to run when the form is opened in non-edit mode? I am using
ExecuteOrDelayUntilScriptLoaded(myFunction,"sp.js"); to kick off the code, if that makes any difference.