Also check for previousKeyboardFocus and previousScrollFocus before cancelling a focus change
Better commented out debug code.
Javadocs.
Merge remote-tracking branch 'origin/master'
Merge pull request #2430 from duriej/master

Fix for Dialogs steal keyboard focus and don't give it back
Merge remote-tracking branch 'origin/master'