Issue 93 - Fix for dialog not being visible in viewport

Fix for #93, because of the order of events currently the dialog is rendered after the list of search results and then the list of results is cleared leaving the users scroll position at the bottom of the window.  

Changing the order of events means the viewport scrolled to the focussed dialog button.

Note: In order to test this it is necessary to amend the example so the page scrolls (add a pre tag with whitespace).