Set focus on cancel button if there is one

Fixes issue #133. I have a manually-edited minified version on `issue133-min`, which can be merged into here if desired.