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.

[Tooltip] Prevents normal scrolling

See original GitHub issue

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Scrolling should work.

What is the current behavior?

Scrolling on a touch device doesn’t work if the target of the gesture is an element using the mdTooltip Directive.

What are the steps to reproduce?

Add the mdTooltip Directive on any element. Use a mobile device / emulator to scroll the document, while targeting the element on which you set the directive. Scrolling doesn’t work.

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

"dependencies": {
    "@angular/animations": "^4.1.2",
    "@angular/common": "^4.0.0",
    "@angular/compiler": "^4.0.0",
    "@angular/core": "^4.0.0",
    "@angular/flex-layout": "^2.0.0-beta.8",
    "@angular/forms": "^4.0.0",
    "@angular/http": "^4.0.0",
    "@angular/material": "^2.0.0-beta.6",
    "@angular/platform-browser": "^4.0.0",
    "@angular/platform-browser-dynamic": "^4.0.0",
    "@angular/router": "^4.0.0",
    "@ngrx/core": "^1.2.0",
    "@ngrx/effects": "^2.0.3",
    "@ngrx/router-store": "^1.2.6",
    "@ngrx/store": "^2.2.2",
    "angularfire2": "^4.0.0-rc.0",
    "core-js": "^2.4.1",
    "firebase": "^3.9.0",
    "hammerjs": "^2.0.8",
    "localforage": "^1.5.0",
    "rxjs": "^5.1.0",
    "zone.js": "^0.8.4"
  }

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:34
  • Comments:33 (3 by maintainers)

github_iconTop GitHub Comments

17reactions
kekel87commented, Jun 12, 2017

I’ve got the same problem. I found a solution by overriding the Hammer configuration class :

app.module.ts

import { HAMMER_GESTURE_CONFIG } from '@angular/platform-browser'
import { MyGestureConfig } from './config/my-gesture-config';

@NgModule({
	...
	providers: [
		{
			provide: HAMMER_GESTURE_CONFIG,
			useClass: MyGestureConfig
		}
	]
	...
})

my-gesture-config.ts

import { Injectable } from '@angular/core';
import { GestureConfig } from '@angular/material';

@Injectable()
export class MyGestureConfig extends GestureConfig {
    buildHammer(element: HTMLElement) {
        let mc = <HammerManager>super.buildHammer(element);
        
	mc.set({ touchAction: "pan-y" });

        // Your other configurations
        mc.get('swipe').set({ velocity: 0.3, threshold: 10 });

        return mc;
    }
}
15reactions
mackelitocommented, May 31, 2018

is this something that will be fixed in a upcomming release? or should we handle it on our own?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can CSS Prevent Tooltips Overflow? - CSS-Tricks
Sometimes UI elements, like tooltips, need to be edge-aware to prevent the content inside from triggering weird scrollbars or cutting off ...
Read more >
Prevent CSS tooltip from going out of page/window
Unfortunately, if you want to keep your tooltip good positioning, it isn't possible using only CSS. Script solutions.
Read more >
Solved: Scrolling issue with chart tooltips - Qlik Community
Solved: Hi, I have an issue in a mashup page with graph tooltips that show on hover. In the image below, the mouse...
Read more >
Solved: Scrolling in Tool Tips - Microsoft Power BI Community
I created report pages tooltips and as soon as the table appears and I want to click on the table or scroll, it...
Read more >
203364 – Inplace tooltip does not disappear correctly - Bugs
Here is a sequence of events as normally expected and handled by the grid and ... Scrolling will stop More information: The call...
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