VE-contain-draggable: Keep dialog in the window

Fixes: http://screencast.com/t/5UWnMUQV