Handle double tab as if it was a double_click

This commit is contained in:
Luigi Trabacchin 2025-02-20 23:33:48 +01:00 committed by Safwan Samsudeen
parent 7419b37847
commit 108eeb5898

View File

@ -385,6 +385,27 @@ export default class Bar {
});
$.on(this.group, 'dblclick', (e) => {
if (this.action_completed) {
// just finished a move action, wait for a few seconds
return;
}
this.group.classList.remove('active');
if (this.gantt.popup)
this.gantt.popup.parent.classList.remove('hide');
this.gantt.trigger_event('double_click', [this.task]);
});
let tapedTwice = false;
$.on(this.group, 'touchstart', (e) => {
if (!tapedTwice) {
tapedTwice = true;
setTimeout(function () { tapedTwice = false; }, 300);
return false;
}
e.preventDefault();
//action on double tap goes below
if (this.action_completed) {
// just finished a move action, wait for a few seconds
return;