LmnFocusDisabledDirective
Decorators: |
|
Selectors: | [ |
Directive to disable focus on the host element and all focusable elements inside it.
This directive is useful when you want to disable focus on a component and all its children. The original tabindex value is saved and restored when the directive is disabled.
Properties
Name | Type | Description |
---|---|---|
excludeHost r |
| Whether to exclude the host element from the focus disabling. Default is |
unfocusable r |
| Whether to disable focus on the host element and all focusable elements inside it. Default is |
Example usage
<div lmnFocusDisabled ="true">
<input type="text" />
<button>Click me</button>
<a href="#">Link</a>
<a href="#" tabindex="0">Link with tabindex</a>
<a href="#" tabindex="-1">Link with negative tabindex</a>
<a href="#" tabindex="1">Link with positive tabindex</a>
<a href="#" tabindex="2">Link with positive tabindex</a>
</div>