question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pinch event does no longer work when MatTooltipModule is imported

See original GitHub issue

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Pinch event should work.

Importing MatTooltipModule should have no impact on events that are specified in @angular/platform-browser.

What is the current behavior?

pinch events are no longer fired.

What are the steps to reproduce?

https://angular-vcghq7.stackblitz.io/ (use a touch-enabled device to test pinching)

Removing the MatTooltipModule import from app.module.ts makes pinching work again.

What is the use-case or motivation for changing an existing behavior?

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

At least @angular/material@^7

Is there anything else we should know?

Seems like the following commit introduced a provider for HAMMER_GESTURE_CONFIG that does not register pinch events: https://github.com/angular/material2/pull/12941/commits/866c1418c6bb5058433acd8225d942e201cf5958

Also, this provider seems to alter the way hammer-js related gestures are interpreted for the complete application.

See https://github.com/angular/material2/blob/master/src/lib/core/gestures/gesture-config.ts

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
eltharyndcommented, Jul 29, 2019

The exact same behaviour happens when importing MatSlideToggleModule

just lost 2 hours T_T

1reaction
ClemensSchneidercommented, May 8, 2019

No reaction at all? As it is totally unexpected to loose pinch-events when using material tooltips, it should be addressed…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pinch Gesture not working | Apple Developer Forums
Run the code, do the "pinching" with the two circles and the mouse and the "PINCH" text does not show up in the...
Read more >
Tooltip issue, MatTooltip not working in Angular - Stack Overflow
To use Angular-Material Tooltip you will need: Import the BrowserAnimationsModule and MatTooltipModule : app.module.ts import { BrowserAnimationsModule } ...
Read more >
PinchHandler QML Type | Qt Quick 6.4.1
PinchHandler is a handler that interprets a multi-finger gesture to interactively rotate, zoom, and drag an Item. Like other Input Handlers, by default...
Read more >
PinchGestureHandler | React Native Gesture Handler
A continuous gesture handler that recognizes pinch gesture. It allows for tracking the distance between two fingers and use that information to scale...
Read more >
Tooltip - Angular Material
import {MatTooltipModule} from '@angular/material/tooltip'; ... tooltip directive uses a long press gesture to show and hide, however it can conflict with ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found