Commit e719bb3f authored by Maxim Kadushkin's avatar Maxim Kadushkin

initialize scroller before the menu opened

parent bab0bfc3
...@@ -727,13 +727,15 @@ define([ ...@@ -727,13 +727,15 @@ define([
items: [], items: [],
maxHeight : 600, maxHeight : 600,
restoreHeight: 600 restoreHeight: 600
}).on('render:after', function(mnu) { }).on('show:before', function(mnu) {
if ( !this.scroller ) {
this.scroller = new Common.UI.Scroller({ this.scroller = new Common.UI.Scroller({
el: $(this.el).find('.dropdown-menu '), el: $(this.el).find('.dropdown-menu '),
useKeyboard: this.enableKeyEvents && !this.handleSelect, useKeyboard: this.enableKeyEvents && !this.handleSelect,
minScrollbarLength : 40, minScrollbarLength: 40,
alwaysVisibleY: true alwaysVisibleY: true
}); });
}
}).on('show:after', function(btn, e) { }).on('show:after', function(btn, e) {
var mnu = $(this.el).find('.dropdown-menu '), var mnu = $(this.el).find('.dropdown-menu '),
docH = $(document).height(), docH = $(document).height(),
...@@ -1549,7 +1551,7 @@ define([ ...@@ -1549,7 +1551,7 @@ define([
this.mnuColorSchema = new Common.UI.Menu({ this.mnuColorSchema = new Common.UI.Menu({
maxHeight : 600, maxHeight : 600,
restoreHeight: 600 restoreHeight: 600
}).on('render:after', function(mnu) { }).on('show:before', function(mnu) {
this.scroller = new Common.UI.Scroller({ this.scroller = new Common.UI.Scroller({
el: $(this.el).find('.dropdown-menu '), el: $(this.el).find('.dropdown-menu '),
useKeyboard: this.enableKeyEvents && !this.handleSelect, useKeyboard: this.enableKeyEvents && !this.handleSelect,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment