diff --git a/apps/common/main/lib/template/SearchPanel.template b/apps/common/main/lib/template/SearchPanel.template
index f9025bf788..a3c9f23c30 100644
--- a/apps/common/main/lib/template/SearchPanel.template
+++ b/apps/common/main/lib/template/SearchPanel.template
@@ -3,6 +3,7 @@
+
@@ -60,4 +61,5 @@
+
\ No newline at end of file
diff --git a/apps/common/main/lib/view/SearchPanel.js b/apps/common/main/lib/view/SearchPanel.js
index cb43db8981..85b47446db 100644
--- a/apps/common/main/lib/view/SearchPanel.js
+++ b/apps/common/main/lib/view/SearchPanel.js
@@ -176,6 +176,13 @@ define([
this.$resultsContainer = $('#search-results');
this.$resultsContainer.hide();
+ this.$searchContainer = $('#search-container');
+ this.$searchContainer.scroller = new Common.UI.Scroller({
+ el : $('#search-container'),
+ useKeyboard : true,
+ minScrollbarLength: 40
+ });
+
Common.NotificationCenter.on('search:updateresults', _.bind(this.disableNavButtons, this));
if (window.SSE) {
this.cmbWithin = new Common.UI.ComboBox({
@@ -327,10 +334,23 @@ define([
ChangeSettings: function(props) {
},
+ updateScrollers: function () {
+ this.$resultsContainer.scroller.update({alwaysVisibleY: true});
+ this.$searchContainer.scroller.update({alwaysVisibleY: true});
+
+ setTimeout(_.bind(function () {
+ if (this.$searchContainer.find('> .ps-scrollbar-y-rail').is(':visible')) {
+ this.$resultsContainer.find('.ps-scrollbar-y-rail').addClass('set-left');
+ } else {
+ this.$resultsContainer.find('.ps-scrollbar-y-rail').removeClass('set-left');
+ }
+ }, this), 100);
+ },
+
updateResultsContainerHeight: function () {
if (this.$resultsContainer) {
- this.$resultsContainer.outerHeight($('#search-box').outerHeight() - $('#search-header').outerHeight() - $('#search-adv-settings').outerHeight());
- this.$resultsContainer.scroller.update({alwaysVisibleY: true});
+ this.$resultsContainer.outerHeight(Math.max($('#search-box').outerHeight() - $('#search-header').outerHeight() - $('#search-adv-settings').outerHeight(), 112));
+ this.updateScrollers();
}
},
diff --git a/apps/common/main/resources/less/searchdialog.less b/apps/common/main/resources/less/searchdialog.less
index e96e720eff..09eefb3925 100644
--- a/apps/common/main/resources/less/searchdialog.less
+++ b/apps/common/main/resources/less/searchdialog.less
@@ -136,10 +136,7 @@
}
#search-adv-settings {
- position: absolute;
- left: 0;
- right: 0;
- top: 45px;
+ position: relative;
padding: 10px 15px 0 15px;
table {
@@ -238,10 +235,7 @@
}
#search-results {
- position: absolute;
- left: 0;
- right: 0;
- bottom: 0;
+ position: relative;
width: 100%;
border-top: @scaled-one-px-value-ie solid @border-toolbar-ie;
border-top: @scaled-one-px-value solid @border-toolbar;
@@ -268,6 +262,21 @@
font-style: italic;
}
}
+
+ .ps-scrollbar-y-rail {
+ &.set-left {
+ right: 11px !important;
+ }
+ }
+ }
+
+ #search-container {
+ position: absolute;
+ overflow: hidden;
+ top: 45px;
+ left: 0;
+ right: 0;
+ bottom: 0;
}
}
\ No newline at end of file
diff --git a/apps/documenteditor/main/app/controller/Search.js b/apps/documenteditor/main/app/controller/Search.js
index 47c16acd6d..23b9fbd25d 100644
--- a/apps/documenteditor/main/app/controller/Search.js
+++ b/apps/documenteditor/main/app/controller/Search.js
@@ -333,7 +333,7 @@ define([
onEndTextAroundSearch: function () {
if (this.view) {
this._state.isStartedAddingResults = false;
- this.view.$resultsContainer.scroller.update({alwaysVisibleY: true});
+ this.view.updateScrollers();
}
},
diff --git a/apps/presentationeditor/main/app/controller/Search.js b/apps/presentationeditor/main/app/controller/Search.js
index bc4ca16a49..803114b604 100644
--- a/apps/presentationeditor/main/app/controller/Search.js
+++ b/apps/presentationeditor/main/app/controller/Search.js
@@ -299,7 +299,7 @@ define([
onEndTextAroundSearch: function () {
if (this.view) {
this._state.isStartedAddingResults = false;
- this.view.$resultsContainer.scroller.update({alwaysVisibleY: true});
+ this.view.updateScrollers();
}
},
diff --git a/apps/spreadsheeteditor/main/app/controller/Search.js b/apps/spreadsheeteditor/main/app/controller/Search.js
index b327d98209..efbbeda6fb 100644
--- a/apps/spreadsheeteditor/main/app/controller/Search.js
+++ b/apps/spreadsheeteditor/main/app/controller/Search.js
@@ -429,7 +429,7 @@ define([
onEndTextAroundSearch: function () {
if (this.view) {
this._state.isStartedAddingResults = false;
- this.view.$resultsContainer.scroller.update({alwaysVisibleY: true});
+ this.view.updateScrollers();
}
},
diff --git a/apps/spreadsheeteditor/main/resources/less/leftmenu.less b/apps/spreadsheeteditor/main/resources/less/leftmenu.less
index 33193e4a04..355c644825 100644
--- a/apps/spreadsheeteditor/main/resources/less/leftmenu.less
+++ b/apps/spreadsheeteditor/main/resources/less/leftmenu.less
@@ -779,6 +779,7 @@
top: 28px;
width: 100%;
overflow: hidden;
+ padding-bottom: 10px;
.item {
padding: 0;
display: flex;