Skip to content

Commit e440b12

Browse files
authored
Merge pull request #4 from taskbase/remove-scrollIntoView
Remove scrollIntoView of keyboard
2 parents f0ecd74 + 7f1d5dd commit e440b12

File tree

3 files changed

+2
-15
lines changed

3 files changed

+2
-15
lines changed

projects/angular-keyboard/src/lib/keyboard-container/keyboard-container.component.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@
77
</div>
88
<tb-keyboard class="keyboard"
99
id="keyboard"
10-
*ngIf="inputFocused != null"
11-
(viewInitialized)="onKeyboardViewInit()">
10+
*ngIf="inputFocused != null">
1211
</tb-keyboard>

projects/angular-keyboard/src/lib/keyboard-container/keyboard-container.component.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,4 @@ export class KeyboardContainerComponent implements OnInit, OnDestroy {
4040
}
4141
}
4242

43-
onKeyboardViewInit() {
44-
45-
if (this.inputFocused != null) {
46-
this.inputFocused.scrollIntoView();
47-
}
48-
}
49-
5043
}

projects/angular-keyboard/src/lib/keyboard/keyboard.component.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@ import {AngularKeyboardService} from '../angular-keyboard.service';
1111
],
1212
changeDetection: ChangeDetectionStrategy.OnPush
1313
})
14-
export class KeyboardComponent implements OnInit, AfterViewInit {
14+
export class KeyboardComponent implements OnInit {
1515

1616
@Output() pressedKey = new EventEmitter();
17-
@Output() viewInitialized = new EventEmitter();
1817

1918
readonly keyboardCommandButton = KeyboardCommandButton;
2019

@@ -64,10 +63,6 @@ export class KeyboardComponent implements OnInit, AfterViewInit {
6463
private keyboardService: AngularKeyboardService
6564
) { }
6665

67-
ngAfterViewInit() {
68-
this.viewInitialized.emit();
69-
}
70-
7166
get shiftPressed() {
7267
return this._shiftPressed;
7368
}

0 commit comments

Comments
 (0)