Think of it like this..
Josh is on the boundary, slings one sidearm to Diggs in the corner of the endzone, ball travels in the air entirely out of bounds. Diggs toe drags, catches the ball while it is outside the boundary, the ball traveled the whole way outside of the boundary...that's a TD as long as he completes the process of the catch.
Now, Josh in on boundary, Josh throws against his body to Diggs in the middle of the field. Its short, and Diggs, while having his feet planted in the end zone, has lean forward to catch ball and falls straight down and he is touched down immediately .His feet are in endzone ,never left, but the ball never crossed the plane of the goal line. That is not a TD.