From bb820ab388b50c547ae54e6bd2b5d5d210587007 Mon Sep 17 00:00:00 2001 From: Bruno Da Silva Date: Fri, 13 Apr 2018 08:57:36 +0000 Subject: [PATCH] advanced search: bugfix - the modal window did update the history which resulted in several border effect like having request string too long and crashing on several pages SVN:trunk[5656] --- js/search/search_form_handler.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/js/search/search_form_handler.js b/js/search/search_form_handler.js index 88405d5fa..0c84ada32 100644 --- a/js/search/search_form_handler.js +++ b/js/search/search_form_handler.js @@ -172,11 +172,17 @@ $(function() $('body').on('update_history.itop', function(oEvent, oData) { - if (me.element.parents('.ui-dialog').length != 0) - { - //search form in modal are forbiden to update history! - return; - } + // if (me.element.parents('.ui-dialog').length != 0) + // { + // //search form in modal are forbidden to update history! + // return; + // } + + if ($('.ui-dialog:visible :itop-search_form_handler').length != 0) + { + //if a modal containing a dialog is visible then the history update event come from it, whe do not want to update the history in this case! + return; + } var sNewUrl = GetAbsoluteUrlAppRoot()+'pages/UI.php?operation=search'; sNewUrl = sNewUrl + '&filter='+oData['filter'];