From f415c0e5160c8aed6852aa7889b0642fb0c0af34 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Fri, 7 Nov 2014 11:18:58 -0200 Subject: [PATCH] trying to add closeModal to browser's url/hash history --- js/interface_common.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/js/interface_common.js b/js/interface_common.js index 8edbcba..e35ad7b 100644 --- a/js/interface_common.js +++ b/js/interface_common.js @@ -30,6 +30,12 @@ function openModal( modalClass ) //fecha o modal removendo o conteúdo por detach function closeModal($this) +{ + closeModalHandler($this); + window.location.hash = ''; +} + +function closeModalHandler($this) { var $body = $( "body" ); var $modalWindows = $( "body" ).children( ".modal-blackout" ); @@ -370,6 +376,8 @@ function watchHashChange(e) }else if (hashdata[1] == 'hashtag') { openHashtagModalFromSearch(hashdata[2]); } + } else { + closeModalHandler(); } }