I was just typing a long string of text into an input field in Chrome. I saw my screen flash briefly and the shape of a dialog box appear, but before I could stop typing I had already hit some key that closed the box (I'm guessing space, but possibly a letter or even enter).
How can I find out what the dialog box said and what action I took to close it?
I'm using OS X Yosemite 10.10.5.
Unfortunately, I have to inform you, that there's no such possibility in OS X Yosemite. Operating system doesn't log this type of event for dialog windows.
The information you have - is not even enough to understand who fired this window to popup: was it dialog box, was it OSX window, was it another program with informational message which raised the popup, or it was simply styled popup/popover of the web-page you've been.
All OSX can do - is to reopen regular windows, programs, restore console, etc, when you reboot Mac OS X with a checkbox next to “Reopen windows when logging back in” that restores all of your currently open applications and windows. This state is stored, but not for dialog windows.