Tabulator: Cell Context Menu Placement Incorrect (Sometimes)

Created on 7 Apr 2020  路  4Comments  路  Source: olifolkerd/tabulator

Describe the bug
Using the cell contextMenu option, the context menu does not always appear at the click location. It appears somewhere towards the bottom of the screen in the fiddle.

Tabulator Info
4.6.1

Working Example
https://jsfiddle.net/d8gr3uby/

To Reproduce
A step by step guide to recreate the issue in your JS Fiddle or Codepen:

  1. Open Fiddle
  2. Right click the age column.
  3. Look for the context menu.
    It seems to happen with the last row every time. It happens if you right click towards the bottom of the second row. It does not happen with the first row.

Expected behavior
Menu should appear at the click location.

Screenshots
MisplacedMenu

Desktop:

  • OS: macOS Catalina 10.15.4
  • Browser: Chrome
  • Version: 80.0.3987.163
Bug

All 4 comments

Hey @nrayburn-tech

Thanks for the headsup, i will have a look into it this week and get a fix in the weekend patch release.

Cheers

Oli :)

I am not sure how related the menus are, but I also have this issue with the rowContextMenu on the table.
The only difference is, it seems to apply regardless of which column I right click.

It is in a more complex app, so I don't have an example to share.

The rowContextMenu will appear for all columns. It is bound to the row whole row. Not a special column

Hey @nrayburn-tech

I have pushed a fix for this to master and will include it in sundays patch release.

The issue arose when the table was close to the bottom edge of the body element but when there was still space in the viewport. Tabulator wasn't taking into account both heights

Cheers

Oli :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sphynx79 picture sphynx79  路  3Comments

Manbec picture Manbec  路  3Comments

alainpannetier picture alainpannetier  路  3Comments

Honiah picture Honiah  路  3Comments

aballeras01 picture aballeras01  路  3Comments