Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MatTooltip] The MatTooltip is showing on click on mobile #12223

Closed
Jak3b0 opened this issue Jul 15, 2018 · 8 comments · Fixed by #12250 or #13117
Closed

[MatTooltip] The MatTooltip is showing on click on mobile #12223

Jak3b0 opened this issue Jul 15, 2018 · 8 comments · Fixed by #12250 or #13117
Assignees
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@Jak3b0
Copy link

Jak3b0 commented Jul 15, 2018

Bug, feature request, or proposal:

Bug

What is the expected behavior?

On mobile, the tool tip should appear on long-press, as per documentation.

What is the current behavior?

The tool tip appears on click.

What are the steps to reproduce?

  1. On a mobile device, open this link: https://angular-material2-issue-y3usz3.stackblitz.io
  2. Click on the button

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

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

Angular 6.0.6
Angular Material 6.3

Is there anything else we should know?

@crisbeto
Copy link
Member

What kind of device are you testing against? I couldn't reproduce it on iOS.

@Jak3b0
Copy link
Author

Jak3b0 commented Jul 16, 2018 via email

@crisbeto crisbeto self-assigned this Jul 16, 2018
@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent has pr labels Jul 17, 2018
crisbeto added a commit to crisbeto/material2 that referenced this issue Jul 17, 2018
Fixes the tooltip opening on clicks on Android devices. Also does some minor cleanup.

Fixes angular#12223.
@skaiser
Copy link

skaiser commented Aug 8, 2018

I'm still seeing this issue on iOS (multiple device models). We were mostly able to avoid it on Android by doing:
{
provide: MAT_TOOLTIP_DEFAULT_OPTIONS,
useValue: {
showDelay: 1000,
hideDelay: 0, // default value
touchendHideDelay: 1500, // default value
} as MatTooltipDefaultOptions
},

But it still happens on iOS almost every time.

@skaiser
Copy link

skaiser commented Aug 10, 2018

Seems like the if statement should be if (!this._platform.IOS) instead of if (!_platform.IOS)?

jelbourn pushed a commit that referenced this issue Aug 23, 2018
Fixes the tooltip opening on clicks on Android devices. Also does some minor cleanup.

Fixes #12223.
jelbourn pushed a commit that referenced this issue Aug 23, 2018
Fixes the tooltip opening on clicks on Android devices. Also does some minor cleanup.

Fixes #12223.
jelbourn pushed a commit that referenced this issue Aug 29, 2018
Fixes the tooltip opening on clicks on Android devices. Also does some minor cleanup.

Fixes #12223.
electric-drummer added a commit to electric-drummer/material2 that referenced this issue Sep 13, 2018
…Closure property renaming

Prevents potential name collisions on window object, due to Closure compiler property renaming,
that result in incorrect detection of iOS and cause tooltips to show on tap.

Fixes angular#12223
jelbourn pushed a commit that referenced this issue Sep 14, 2018
…Closure property renaming (#13117)

Prevents potential name collisions on window object, due to Closure compiler property renaming,
that result in incorrect detection of iOS and cause tooltips to show on tap.

Fixes #12223
@anthonyartese
Copy link

anthonyartese commented Oct 22, 2018

My solution:
<button #tooltip="matTooltip" (click)="tooltip.toggle()" matTooltip="text" matTooltipPosition="above" aria-label="Button that shows a tooltip"> Tooltip </button>
Pieced this together based on Material documentation for manually toggling show/hide:

@Abdulrahmanh995
Copy link

Same here on my Huwawei Mate 10 Lite.
The tooltip is never shown unless triggering it manually based on @anthonyartese solution or on long press.

@AndresSp
Copy link

The @anthonyartese solution works like charm for me Angular 5!

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
6 participants