Optional autofocus on selection

Fix for jshint