How to remove tooltip from [mat-icon] button in an Electron application?

你离开我真会死。 提交于 2020-02-23 04:09:51

问题


I need to remove the tooltip from the button.

I'm using Angular/Electron for a desktop application.

I have the following code in the .html file:

<button class="close-button" (click)='closeDialog()'>
  <mat-icon class="svg-mat-icon" svgIcon="menu_cancel"></mat-icon>
</button>

This is the 'X' button in the upper-right corner of the screen. When I hover the mouse over it I get a tooltip "menu_Cancel" above it.

How can I remove that tooltip? The button is self-explanatory, and the user does not need to know the filename used.

Thanks.


回答1:


I had the same problem. I resolved it doing it in my SCSS :

mat-icon {
  svg {
    pointer-events: none;
   }
}


来源:https://stackoverflow.com/questions/54318292/how-to-remove-tooltip-from-mat-icon-button-in-an-electron-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!