summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Ivan Vargas <jvargas@gitlab.com>2017-01-20 16:59:27 -0600
committerJose Ivan Vargas <jvargas@gitlab.com>2017-01-20 16:59:27 -0600
commita20fbcaacd05cca768634d4f42d3d68042ec0530 (patch)
treec12e4bac7ed8c98caf281639e16768b6112a4052
parent948c3e4e20bcfd065f5313fb5c014963c2ef4510 (diff)
downloadgitlab-ce-26623-search-bar-dropdown-doesn-t-load-when-you-go-back-in-browser-history.tar.gz
Fixed search component not instantiating back when pressing the back button on the issue page26623-search-bar-dropdown-doesn-t-load-when-you-go-back-in-browser-history
-rw-r--r--app/views/shared/issuable/_search_bar.html.haml10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/views/shared/issuable/_search_bar.html.haml b/app/views/shared/issuable/_search_bar.html.haml
index 8d7b1d616f4..42f2a8b6be2 100644
--- a/app/views/shared/issuable/_search_bar.html.haml
+++ b/app/views/shared/issuable/_search_bar.html.haml
@@ -125,3 +125,13 @@
event.preventDefault();
Turbolinks.visit(this.action + '&' + $(this).serialize());
});
+
+ $(document).off('page:restore').on('page:restore', function (event) {
+ if (gl.FilteredSearchManager) {
+ new gl.FilteredSearchManager();
+ }
+ Issuable.init();
+ new gl.IssuableBulkActions({
+ prefixId: 'issue_',
+ });
+ });