Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions projects/angular-ui/src/lib/file/file-input.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
baoFileDrop
class="file-drop-zone"
(fileDrop)="uploadFile($event)"
#dropzone
>
<button
bao-button
Expand All @@ -13,8 +12,6 @@
level="secondary"
[disabled]="disabled"
(click)="uploader.click()"
aria-hidden="true"
tabIndex="-1"
>
{{ intl.dropzoneButtonLabel }}
</button>
Expand All @@ -24,6 +21,7 @@
class="sr-only"
[disabled]="disabled"
(change)="uploadFile($event.target.files[0])"
tabindex="-1"
#uploader
/>
<ng-container
Expand Down
23 changes: 0 additions & 23 deletions projects/angular-ui/src/lib/file/file-input.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@ export class BaoFileInputComponent
*/
@ViewChild('uploader', { static: false }) private uploader: ElementRef;

@ViewChild('dropzone', { static: false })
private dropzoneElement: ElementRef<HTMLElement>;

public insertDefaultInstructions = false;
public isFileTooBig = false;
public isFileTypeInvalid = false;
Expand Down Expand Up @@ -152,26 +149,6 @@ export class BaoFileInputComponent
}
}

@HostListener('window:keyup.tab')
tabKeyEvent() {
if (document.activeElement.id === this.inputId) {
this.renderer.addClass(
this.dropzoneElement.nativeElement,
'dropzone-focus'
);
}
}

@HostListener('window:keyup.shift.tab')
shiftTabKeyEvent() {
if (document.activeElement.id === this.inputId) {
this.renderer.addClass(
this.dropzoneElement.nativeElement,
'dropzone-focus'
);
}
}

public ngAfterContentInit(): void {
this._errorForm.changes.subscribe(() => this.setErrorTextsAttribute());
if (!this.inputId) {
Expand Down
Loading