Skip to content

Commit

Permalink
Double tap fix (backport #6979) [release/4.7.x] (#6981)
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Jul 17, 2024
1 parent 7fa006e commit c6399d1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@itwin/core-frontend",
"comment": "",
"type": "none"
}
],
"packageName": "@itwin/core-frontend"
}
4 changes: 3 additions & 1 deletion core/frontend/src/tools/ToolAdmin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -687,8 +687,10 @@ export class ToolAdmin {
if (undefined === current.touchTapTimer) {
current.touchTapTimer = Date.now();
current.touchTapCount = 1;
// NOTE: We cannot await the executeAfter call below, because that prevents any other
// taps from being processed, which makes it impossible for double tap to happen.
// eslint-disable-next-line @typescript-eslint/unbound-method
await ToolSettings.doubleTapTimeout.executeAfter(this.doubleTapTimeout, this);
void ToolSettings.doubleTapTimeout.executeAfter(this.doubleTapTimeout, this);
} else if (undefined !== current.touchTapCount) {
current.touchTapCount++;
}
Expand Down

0 comments on commit c6399d1

Please sign in to comment.