Affects Version/s: Minecraft 1.11.2
Fix Version/s: None
Environment:macOS Sierra V10.12.3 (16D32) MacBook Pro Retina 15 Inch mid 2014
Processor: 2.5 GHz Intel Core i7
Ram: 16GB 1600 MHz DDR3
Graphics: NVIDIA GeForce GT 750M 2048 MB Intel Iris Pro 1536 MB
Java: V8 Update 121 (1.8.0_121-b13)
Although this could've been reported before (I did several searches which turned nothing of relevance up), opening a command block and then leaving full screen will instantly delete all the command contents of a command block. (Note: You should be on a mac)
Get a command block, you should have OP level 2+/singleplayer cheats and Creative Mode.
Put any command into a command block, it works as long as any text is entered in a command block.
Move out of fullscreen. (Not using the provided option; on mac, you should be able to leave fullscreen by pressing the third button on the top right)
You will see that all the contents of the command block have been deleted.
I've searched for various things, this could possibly duplicate a bug(s) while searching "Window resize".