Disable click outside a step
brieucdlf opened this issue · comments
Hey !
I would like to know if there is an easy way to block the click event when you click outside a step. I cannot figure it out without touching your module ...
I would like to contribute but can not compile your project... Can you give me the step to do it ?
Thanks you very much for you time ! :)
Oh sorry, I am using the material library :)
Try this in your styles.scss
file:
.cdk-overlay-backdrop {
pointer-events: none;
}
Hey !
Thanks for your answer, I managed to get it work with your solution.
I've disabled the scrolling as well with this solution in my app component:
import { MAT_MENU_SCROLL_STRATEGY } from '@angular/material';
import { Overlay, BlockScrollStrategy } from '@angular/cdk/overlay';
export function scrollFactory(overlay: Overlay): () => BlockScrollStrategy {
return () => overlay.scrollStrategies.block();
}
and in the decorator @component:
providers: [{ provide: MAT_MENU_SCROLL_STRATEGY, useFactory: scrollFactory, deps: [Overlay] }],
https://material.angular.io/components/menu/api
https://stackoverflow.com/questions/46888635/disable-scrolling-when-angular-material-select-is-open
Have a good day and thank you for your time !
Try this in your
styles.scss
file:.cdk-overlay-backdrop { pointer-events: none; }
hi The above code disable click outside the matcard on pointer events. wen i hover a button the hand comes and wen i click a button the events happens. please let me know how to avoid it