Fixed setting previousScrollFocus in Dialog class
Fixed issue with restoring scroll focus in case when dialog creates another dialog
Source code formatted correctly
Capture was removed from button table in Dialog
Merge pull request #1244 from OlegTheCat/master

Fixed setting previousScrollFocus in Dialog class
Fixed viewport checks.

closes #1250
Merge remote-tracking branch 'upstream/master'