Skip to content

Commit

Permalink
dxGantt: fix context menu to make it accessible (T1269329) (#28773)
Browse files Browse the repository at this point in the history
  • Loading branch information
Krijovnick authored Jan 21, 2025
1 parent 9dce8d8 commit 3524b57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/devextreme/js/ui/gantt/ui.gantt.treelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export class GanttTreeList {
if(e.row?.rowType === 'data') {
this.setOption('selectedRowKeys', [e.row.data[this._gantt.option('tasks.keyExpr')]]);
}
e.items = [];

const info = {
cancel: false,
event: e.event,
Expand All @@ -118,6 +118,7 @@ export class GanttTreeList {
position: { x: e.event.pageX, y: e.event.pageY }
};
this._gantt._showPopupMenu(info);
e.event.preventDefault();
}

_getHeight() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ QUnit.module('Context Menu', moduleConfig, () => {
assert.equal(getContextMenuElement().length, 0, 'menu is hidden on create');
const $cellElement = $(this.instance._treeList.getCellElement(0, 0));
$cellElement.trigger('contextmenu');
assert.equal(getContextMenuElement().length, 2, 'menu is visible after right click in tree list');
assert.equal(getContextMenuElement().length, 1, 'menu is visible after right click in tree list');
});
test('shown at correct position', function(assert) {
this.createInstance(options.allSourcesOptions);
Expand Down

0 comments on commit 3524b57

Please sign in to comment.