Skip to content

Commit 8167c99

Browse files
authored
fix: button focus
1 parent 8f30a0e commit 8167c99

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

projects/design-angular-kit/src/lib/components/core/button/button.directive.ts

+1-17
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ContentChildren, Directive, Host, HostBinding, HostListener, Input, Optional, QueryList } from '@angular/core';
1+
import { ContentChildren, Directive, Host, HostBinding, Input, Optional, QueryList } from '@angular/core';
22
import { ButtonColor, ButtonSize } from '../../../interfaces/core';
33
import { ItIconComponent } from '../../utils/icon/icon.component';
44
import { ItProgressButtonComponent } from '../progress-button/progress-button.component';
@@ -54,20 +54,8 @@ export class ItButtonDirective {
5454
*/
5555
@ContentChildren(ItIconComponent) protected icons?: QueryList<ItIconComponent>;
5656

57-
private isFocus = false;
58-
5957
constructor(@Optional() @Host() private progressButtonComponent: ItProgressButtonComponent) {}
6058

61-
@HostListener('focus')
62-
protected onFocus() {
63-
this.isFocus = true;
64-
}
65-
66-
@HostListener('blur')
67-
protected onBlur() {
68-
this.isFocus = false;
69-
}
70-
7159
@HostBinding('class')
7260
protected get hostClasses(): string {
7361
let cssClass = 'btn';
@@ -88,10 +76,6 @@ export class ItButtonDirective {
8876
cssClass += ' disabled';
8977
}
9078

91-
if (this.isFocus) {
92-
cssClass += ' focus--mouse';
93-
}
94-
9579
if (this.icons?.length && !this.progressButtonComponent) {
9680
cssClass += ' btn-icon';
9781
}

0 commit comments

Comments
 (0)