mirror of
https://github.com/bitwarden/browser
synced 2024-12-25 17:32:46 +01:00
[CL-104] fix overlay + virtual scroll view recycling bug (#6179)
* close menu overlay when no longer visible * prevent infinite loop in fallback-src directive * block scrolling when menu is open * disable view recycling; use reposition strategy
This commit is contained in:
parent
7cfa38e344
commit
84bafe5e73
@ -58,7 +58,7 @@
|
||||
</tr>
|
||||
</ng-container>
|
||||
<ng-template body let-rows$>
|
||||
<ng-container *cdkVirtualFor="let item of rows$">
|
||||
<ng-container *cdkVirtualFor="let item of rows$; templateCacheSize: 0">
|
||||
<tr
|
||||
*ngIf="item.collection"
|
||||
bitRow
|
||||
|
@ -6,9 +6,15 @@ import { Directive, ElementRef, HostListener, Input } from "@angular/core";
|
||||
export class FallbackSrcDirective {
|
||||
@Input("appFallbackSrc") appFallbackSrc: string;
|
||||
|
||||
/** Only try setting the fallback once. This prevents an infinite loop if the fallback itself is missing. */
|
||||
private tryFallback = true;
|
||||
|
||||
constructor(private el: ElementRef) {}
|
||||
|
||||
@HostListener("error") onError() {
|
||||
if (this.tryFallback) {
|
||||
this.el.nativeElement.src = this.appFallbackSrc;
|
||||
this.tryFallback = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user