bryntum / support

An issues-only repository for the Bryntum project management component suite which includes powerful Grid, Scheduler, Calendar, Kanban Task Board and Gantt chart components all built in pure JS / CSS / TypeScript
https://www.bryntum.com
54 stars 6 forks source link

Incorrect resource on scheduleMenu right click in vertical and mobile emulation #5609

Open chuckn0rris opened 1 year ago

chuckn0rris commented 1 year ago

Forum post

Hi,

We are still experiencing the issue mentioned here: #4988, but only when using a mobile device (or emulating a mobile device such as iPad Air in Chrome Developer Tools).

Reproducer attached, for using on the demo here: https://bryntum.com/examples/calendar/calendar-scheduler

Steps to reproduce:

Replace the example code with the attached, which just adds the following:

scheduleMenu: {
       processItems({ items, resourceRecord }) {
          console.log(resourceRecord.data.name, 'resource');
       }

Right-click inside the grid, and see that the resourceRecord logged out is off by one.

This behaviour does not occur outside of mobile devices/emulation as far as we can see.

https://user-images.githubusercontent.com/7203098/202711745-40666ae4-ad9c-4941-b223-342be9703e4b.mov

taauntik commented 1 year ago

asked for the fix here

mazzafabio commented 1 year ago

The bug is reproducible only on Chrome/Edge browser (I don't know if is the same for Safari). Firefox just works fine, as you can see in the following video: screen-capture.webm

After a long checking, it turns out that we're dealing with Chrome/Edge pointerEvent bug, as you can see in the next video: screen-capture (1).webm Below the code used:

<!DOCTYPE html>
<html lang="en">
    <head>
    </head>

    <body>
        <script>
            document.addEventListener('contextmenu', function(event) {
                console.log(event.clientX, event.clientY);
            }); 
        </script>
    </body>
</html>

However, this bug occurs only when right click is performed on the page, but if you press and hold it works well: tested on my asus zenbook duo that is touchscreen.