Please see WebDirect uncommitted record behavior upon exit for the background.
In a nutshell: When a user accessing a file via WebDirect exits in an unusual fashion (e.g. closes the browser window, hits the browser Back or Reload button, their computer crashes, etc) it appears that WebDirect does an automatic Commit on the data, but does NOT call the OnRecordCommit event.
It would be nice if there was better control over this.
Since the connection has been lost, I can see that executing the OnRecordCommit script wouldn't be possible.
What about a new "ConnectionLost" event that would trigger in this case? In fact, one could even imagine two new layout events:
ConnectionLost: triggers in FileMaker Pro, Go, or WebDirect when the connection is lost.
ConnectionRestored: triggers in FileMaker Pro and Go (but not WebDirect) when the connection is restored.