X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fstatic%2Fmodal.js;fp=webcit%2Fstatic%2Fmodal.js;h=45090b92c0cdfa3f3a3fbf81d40095272b3df30a;hb=28a6cf54f3fcbc9af7ad27ccf5b28928aa94390f;hp=f12aed2252a13474c82c27c4acfce0915d128c03;hpb=13982049053090fa8d6d724934d5f39e258650ce;p=citadel.git diff --git a/webcit/static/modal.js b/webcit/static/modal.js index f12aed225..45090b92c 100644 --- a/webcit/static/modal.js +++ b/webcit/static/modal.js @@ -69,10 +69,12 @@ if ( isSafari ) { // need to do some special stuff to handle MSIE. -var toggleModal = function () { +var toggleModal = function (b) { html.className=modalShowing?'':'modal'; - modalShowing = !modalShowing; + + modalShowing = b; + if (modalShowing) { dialog.focus(); } else if (focusedElement) {