From 4103fc2abbf8cf72d832c8e5740fe0ecd25f5e00 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 21 Jun 2019 11:46:51 +0300 Subject: [PATCH] Menu refactoring: update scroller --- apps/common/main/lib/component/Menu.js | 2 +- apps/spreadsheeteditor/main/app/view/CellEditor.js | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/common/main/lib/component/Menu.js b/apps/common/main/lib/component/Menu.js index 73cc749a6..9359e0ffc 100644 --- a/apps/common/main/lib/component/Menu.js +++ b/apps/common/main/lib/component/Menu.js @@ -380,7 +380,7 @@ define([ onAfterShowMenu: function(e) { this.trigger('show:after', this, e); if (this.scroller) { - this.scroller.update(); + this.scroller.update({alwaysVisibleY: this.scrollAlwaysVisible}); var menuRoot = (this.cmpEl.attr('role') === 'menu') ? this.cmpEl : this.cmpEl.find('[role=menu]'), $selected = menuRoot.find('> li .checked'); if ($selected.length) { diff --git a/apps/spreadsheeteditor/main/app/view/CellEditor.js b/apps/spreadsheeteditor/main/app/view/CellEditor.js index a1bd038ff..c57fe2575 100644 --- a/apps/spreadsheeteditor/main/app/view/CellEditor.js +++ b/apps/spreadsheeteditor/main/app/view/CellEditor.js @@ -62,8 +62,6 @@ define([ { caption: this.textManager, value: 'manager' }, { caption: '--' } ] - }).on('show:after', function () { - this.scroller.update({alwaysVisibleY: true}); }) }); this.btnNamedRanges.render($('#ce-cell-name-menu'));