mirror of https://github.com/Chocobozzz/PeerTube
Fix login form scrolling
parent
1105696623
commit
04c2dcfc6b
|
@ -67,7 +67,7 @@ export class ScrollService {
|
|||
private consumeScroll () {
|
||||
// Handle anchors/restore position
|
||||
this.peertubeRouter.getScrollEvents().subscribe(e => {
|
||||
logger('Will schedule scroll after router event %o.', e)
|
||||
logger('Will schedule scroll after router event %o.', { e, resetScroll: this.resetScroll })
|
||||
|
||||
// scrollToAnchor first to preserve anchor position when using history navigation
|
||||
if (e.anchor) {
|
||||
|
|
|
@ -7,6 +7,8 @@ export class AutofocusDirective implements AfterViewInit {
|
|||
constructor (private host: ElementRef) { }
|
||||
|
||||
ngAfterViewInit () {
|
||||
this.host.nativeElement.focus()
|
||||
const el = this.host.nativeElement as HTMLElement
|
||||
|
||||
el.focus({ preventScroll: true })
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue