Dialog returns focus to previous element after closing (#12824)
Dialog returns focus to previous element after closing (#12824)

* Update showModalDialogUsingTemplate() to save current focus when creating a dialog and set current focus to the previous one when closing

* added a null check for rare cases when document.activeElement is null

* Add missing whitespace

* A bit more whitespace

pratts/brackets,petetnt/brackets,uwsd/brackets,zaggino/brackets-electron,albertinad/brackets,rlugojr/brackets,rlugojr/brackets,Real-Currents/brackets,adobe/brackets,uwsd/brackets,MarcelGerber/brackets,Wikunia/brackets,sprintr/brackets,albertinad/brackets,MarcelGerber/brackets,Real-Currents/brackets,sprintr/brackets,Real-Currents/brackets,uwsd/brackets,zaggino/brackets-electron,zaggino/brackets-electron,pratts/brackets,adobe/brackets,ficristo/brackets,Real-Currents/brackets,MarcelGerber/brackets,zaggino/brackets-electron,albertinad/brackets,sprintr/brackets,thehogfather/brackets,zaggino/brackets-electron,ficristo/brackets,thehogfather/brackets,Wikunia/brackets,MarcelGerber/brackets,rlugojr/brackets,thehogfather/brackets,Real-Currents/brackets,albertinad/brackets,ficristo/brackets,uwsd/brackets,pratts/brackets,Wikunia/brackets,adobe/brackets,petetnt/brackets,Wikunia/brackets,Wikunia/brackets,rlugojr/brackets,petetnt/brackets,thehogfather/brackets,zaggino/brackets-electron,petetnt/brackets,sprintr/brackets,adobe/brackets,adobe/brackets,ficristo/brackets,sprintr/brackets,ficristo/brackets,rlugojr/brackets,pratts/brackets,petetnt/brackets,albertinad/brackets,uwsd/brackets,Real-Currents/brackets,MarcelGerber/brackets,thehogfather/brackets,pratts/brackets