Skip to content

Commit

Permalink
Merge branch 'pu/cf/rt/245171' into 'main'
Browse files Browse the repository at this point in the history
fix(Tinebase/Grid): doesn't able to scroll in GridView Menu

See merge request tine20/tine20!6374
  • Loading branch information
Christian Feitl committed Jan 29, 2025
2 parents 67634df + a001154 commit 15c2617
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tine20/Tinebase/js/ux/grid/GridViewMenuPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Ext.ux.grid.GridViewMenuPlugin = Ext.extend(Object, {
this.showAt(
this.el.getAlignToXY(el, pos || this.defaultAlign, [Ext.isWebKit? 2 : 1, 0]),
parentMenu,
true // true to constrain
false
);
}
});
Expand Down
19 changes: 17 additions & 2 deletions tine20/library/ExtJS/src/widgets/menu/Menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,14 +222,16 @@ Ext.menu.Menu = Ext.extend(Ext.Container, {
scope: this,
click: this.onClick,
mouseover: this.onMouseOver,
mouseout: this.onMouseOut
mouseout: this.onMouseOut,
wheel: this.onScrollWheel
});
if(this.enableScrolling){
this.mon(this.el, {
scope: this,
delegate: '.x-menu-scroller',
click: this.onScroll,
mouseover: this.deactivateActive
mouseover: this.deactivateActive,
wheel: this.onScrollWheel
});
}
},
Expand Down Expand Up @@ -339,6 +341,19 @@ Ext.menu.Menu = Ext.extend(Ext.Container, {
}
},

onScrollWheel : function (e) {
if (!this.enableScrolling) {
return
}

const ul = this.ul.dom
if (e.browserEvent.deltaY > 0) {
ul.scrollTop += this.scrollIncrement;
} else {
ul.scrollTop -= this.scrollIncrement;
}
},

// private
onScrollerIn : function(e, t){
var ul = this.ul.dom, top = Ext.fly(t).is('.x-menu-scroller-top');
Expand Down

0 comments on commit 15c2617

Please sign in to comment.