Skip to content
New issue

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

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

Already on GitHub? # to your account

[Tooltip] Cannot select elements with tooltips attached #7097

Closed
patrikbjork opened this issue Sep 15, 2017 · 3 comments · Fixed by #8106
Closed

[Tooltip] Cannot select elements with tooltips attached #7097

patrikbjork opened this issue Sep 15, 2017 · 3 comments · Fixed by #8106
Assignees
Labels
P4 A relatively minor issue that is not relevant to core functions

Comments

@patrikbjork
Copy link

Bug, feature request, or proposal:

The text within an element having a tooltip can't be selected. Also the cursor doesn't change to text cursor in Firefox.

What is the expected behavior?

The text should be selected either by dragging the cursor or by double-clicking.

What is the current behavior?

The text cannot be selected and in Firefox the cursor doesn't change to text cursor.

What are the steps to reproduce?

Go to https://material.angular.io/components/tooltip/overview and try to select the text "I have a tooltip".

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

The user may want to select and copy the text.

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

Tested version is Angular 4.3.6, Material 2.0.0-beta.10 on Chrome and Firefox.

Is there anything else we should know?

@crisbeto
Copy link
Member

This seems like it's the same issue as #6484. Hammer adds user-select: none on the host element.

@jelbourn jelbourn added the P4 A relatively minor issue that is not relevant to core functions label Sep 15, 2017
@andrewseguin andrewseguin changed the title Can't select text having tooltip [Tooltip] Cannot select elements with tooltips attached Oct 19, 2017
@crisbeto crisbeto self-assigned this Oct 29, 2017
crisbeto added a commit to crisbeto/material2 that referenced this issue Oct 29, 2017
Adds the `MAT_HAMMER_OPTIONS` injection token that allows users to pass in options to the Hammer.js constructor.

Fixes angular#7097.
crisbeto added a commit to crisbeto/material2 that referenced this issue Oct 31, 2017
Adds the `MAT_HAMMER_OPTIONS` injection token that allows users to pass in options to the Hammer.js constructor.

Fixes angular#7097.
crisbeto added a commit to crisbeto/material2 that referenced this issue Nov 2, 2017
Adds the `MAT_HAMMER_OPTIONS` injection token that allows users to pass in options to the Hammer.js constructor.

Fixes angular#7097.
jelbourn pushed a commit that referenced this issue Nov 18, 2017
Adds the `MAT_HAMMER_OPTIONS` injection token that allows users to pass in options to the Hammer.js constructor.

Fixes #7097.
crisbeto added a commit to crisbeto/material2 that referenced this issue Nov 19, 2017
Adds the `MAT_HAMMER_OPTIONS` injection token that allows users to pass in options to the Hammer.js constructor.

Fixes angular#7097.
jelbourn pushed a commit that referenced this issue Nov 20, 2017
…8106)

Adds the `MAT_HAMMER_OPTIONS` injection token that allows users to pass in options to the Hammer.js constructor.

Fixes #7097.
@jinalskothari
Copy link

jinalskothari commented Jan 3, 2019

For future reference, in the root module, do the following:

import { MAT_HAMMER_OPTIONS } from '@angular/material';
  @NgModule({
  // other stuff goes here
  providers: [
    // other stuff goes here
    {
      provide: MAT_HAMMER_OPTIONS,
      useValue: { cssProps: { userSelect: true } },
    },
  ],
})

I do not know if different settings per feature module is possible.

@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
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
P4 A relatively minor issue that is not relevant to core functions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants