From 74eabafe31a076f00367d0777a84d90adde6b0d4 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Thu, 3 Jun 2021 16:19:06 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B04022=20-=20Fix=20scroll=20not=20working?= =?UTF-8?q?=20on=20search=20menu=20nodes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/search/search_form_handler.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/js/search/search_form_handler.js b/js/search/search_form_handler.js index 956cebd56d..7c499b8243 100644 --- a/js/search/search_form_handler.js +++ b/js/search/search_form_handler.js @@ -83,7 +83,7 @@ $(function() // Submit properties (XHR, throttle, ...) submit: null, - // {ScrollMagic.Controller} SM controller for the sticky header + /** @var {ScrollMagic.Controller} SM controller for the sticky header */ sticky_header_controller: null, // the constructor @@ -113,6 +113,8 @@ $(function() this._prepareFormArea(); this._prepareCriterionArea(); this._prepareResultsArea(); + // - Sticky header + this._updateStickyHeaderHandler(); // Binding events (eg. from search_form_criteria widgets) this._bindEvents(); @@ -372,9 +374,6 @@ $(function() this.elements.message_area = this.element.find('.sf_message'); this._cleanMessageArea(); - // - Sticky header - this._updateStickyHeaderHandler(); - // Events // - Refresh icon this.element.find('.sft_refresh').on('click', function(oEvent){ @@ -1412,7 +1411,7 @@ $(function() */ _getResultsPanelElem: function() { - return $(this.options.result_list_outer_selector).find('[data-role="ibo-panel"]:first') + return this.elements.results_area === null ? null : this.elements.results_area.find('[data-role="ibo-panel"]:first') }, /** * @return {Object} The jQuery object representing the top toolbar of the results (pagination, ...) @@ -1420,7 +1419,7 @@ $(function() */ _getResultsToolbarTopElem: function() { - return $(this.options.result_list_outer_selector).find('.ibo-datatable--toolbar:first'); + return this.elements.results_area === null ? null : this.elements.results_area.find('.ibo-datatable--toolbar:first'); }, /** * @return {Object} The jQuery object representing the columns headers of the results @@ -1428,7 +1427,7 @@ $(function() */ _getResultsTableHeaders: function() { - return $(this.options.result_list_outer_selector).find('.dataTables_scrollHead:first'); + return this.elements.results_area === null ? null : this.elements.results_area.find('.dataTables_scrollHead:first'); },