The crop tool's toolbar likes to steal typing focus. Normally if you're in the crop tool but haven't touched the ratio boxes you can use, say, the X key to flip the ratios. But if you've recently typed in a ratio and haven't hit Esc since then, you're going to get an error for an invalid number. Even if you've clicked back to the image.
Basically, when in the crop tool, clicking on the image should take focus back out of the toolbar like it does with most other tools.