angular / material

Material design for AngularJS
https://material.angularjs.org/
MIT License
16.55k stars 3.39k forks source link

tooltip: don't work on buttons in a md-fab-toolbar #5124

Open Alexandre-io opened 8 years ago

Alexandre-io commented 8 years ago

All tooltips are opened on the same location when mouse is over the fab-toolbar. Example: http://codepen.io/anon/pen/pjrLog

ThomasBurleson commented 8 years ago
SanderElias commented 8 years ago

Duplicate/variation of #4445

ishankhare07 commented 8 years ago

@SanderElias the issue with the fab-speed-dial is solved but not with fab-toolbar -> http://codepen.io/ishankhare07/pen/dMpjXP?editors=1010 the position issue has still not fixed also i'd like to mention that using ng-if only affects the visibility, but DOES NOT fix the position

nicooga commented 8 years ago

Is there a workaround for this?

topherfangio commented 8 years ago

@ishankhare07 @nicooga You are correct, this was not fixed with the speed dial fixes. Re-opening and assigning to myself.

rahulvc01 commented 8 years ago

+1

harvellm commented 8 years ago

+1

adibas03 commented 8 years ago

+1

leandroruel commented 8 years ago

+1

Volodymyr-Mishyn commented 8 years ago

+1

charlieargue commented 8 years ago

+1

Gisonrg commented 8 years ago

+1 doesn't work on iOS both Chrome and Safari

WanManolo commented 7 years ago

+1

ryanzola commented 7 years ago

+1

patoncrispy commented 7 years ago

Yeah would be pretty nice to see this fixed. My toolbar is very 'wordy' and would be great to use icons+tooltips instead.

johnrix commented 7 years ago

+1

One simple (but ugly) workaround is to just use the 'title' attribute on <md-button> instead of using md-tooltip

Rahul-Sagore commented 6 years ago

I have a way to fix it. But it is not perfect solution. After checking the Angular-Material's code I found that the tooltip gets initialised based on parent's pointer-events css properties, which makes sure the parent has pointer events and not set to none.

I was having the same problem, So I fixed it by adding pointer events to the menu's icon and removing it after the page has loaded. Codepen Link

Steps to fix:

1) Add this css code into your css file (Make sure it override existing css)

md-fab-toolbar md-toolbar.pevents__initial {
      pointer-events: initial;
}

2) Add pevents__initial class to the md-toolbar element, which is inside md-fab-toolbar:

    <md-toolbar class='pevents__initial'>
        <md-fab-actions class="md-toolbar-tools">
        </md-fab-actions>
    </md-toolbar>

3) Add this javascript code to remove pevents__initial class from your above code :

setTimeout(function() {
   $('.pevents__initial').removeClass('pevents__initial');
}, 1000);

This is just a hack to make tooltip work inside fab toolbar. Need to read the official code more to find more better solution. But this works for me right now.

Splaktar commented 3 years ago

I updated a similar CodePen from #7380 to AngularJS Material 1.2.2 and this issue is still there.

Screen Shot 2020-12-21 at 00 54 45