mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 13:53:34 +00:00
[PS-1222] Remove appBlurClick throughout the popup and web code (#3208)
* Remove appBlurClick throughout the popup code `appBlurClick` leads to focus being lost/reset for assistive technology users. It should not be necessary in any case - if focus does need to move after an action, explicitly set it somewhere programmatically using `focus()` rather than relying on browser heuristics * Remove now redundant blur-click directive
This commit is contained in:
@@ -26,26 +26,19 @@
|
|||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
appStopClick
|
appStopClick
|
||||||
appBlurClick
|
|
||||||
(click)="selectAllVaults()"
|
(click)="selectAllVaults()"
|
||||||
[ngClass]="{ active: !myVaultOnly && !selectOrganizationId }"
|
[ngClass]="{ active: !myVaultOnly && !selectOrganizationId }"
|
||||||
>
|
>
|
||||||
<i class="bwi bwi-fw bwi-filter" aria-hidden="true"></i>
|
<i class="bwi bwi-fw bwi-filter" aria-hidden="true"></i>
|
||||||
{{ "allVaults" | i18n }}
|
{{ "allVaults" | i18n }}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button *ngIf="!enforcePersonalOwnwership" appStopClick (click)="selectMyVault()">
|
||||||
*ngIf="!enforcePersonalOwnwership"
|
|
||||||
appStopClick
|
|
||||||
appBlurClick
|
|
||||||
(click)="selectMyVault()"
|
|
||||||
>
|
|
||||||
<i class="bwi bwi-fw bwi-user" aria-hidden="true"></i>
|
<i class="bwi bwi-fw bwi-user" aria-hidden="true"></i>
|
||||||
{{ "myVault" | i18n }}
|
{{ "myVault" | i18n }}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
*ngFor="let organization of organizations"
|
*ngFor="let organization of organizations"
|
||||||
appStopClick
|
appStopClick
|
||||||
appBlurClick
|
|
||||||
(click)="selectOrganization(organization)"
|
(click)="selectOrganization(organization)"
|
||||||
>
|
>
|
||||||
<i
|
<i
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" class="btn btn-primary btn-submit" appBlurClick>
|
<button type="submit" class="btn btn-primary btn-submit">
|
||||||
<span>{{ "ok" | i18n }}</span>
|
<span>{{ "ok" | i18n }}</span>
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">
|
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
import { Directive, ElementRef, HostListener } from "@angular/core";
|
|
||||||
|
|
||||||
@Directive({
|
|
||||||
selector: "[appBlurClick]",
|
|
||||||
})
|
|
||||||
export class BlurClickDirective {
|
|
||||||
constructor(private el: ElementRef) {}
|
|
||||||
|
|
||||||
@HostListener("click") onClick() {
|
|
||||||
this.el.nativeElement.blur();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -11,7 +11,6 @@ import { A11yInvalidDirective } from "./directives/a11y-invalid.directive";
|
|||||||
import { A11yTitleDirective } from "./directives/a11y-title.directive";
|
import { A11yTitleDirective } from "./directives/a11y-title.directive";
|
||||||
import { ApiActionDirective } from "./directives/api-action.directive";
|
import { ApiActionDirective } from "./directives/api-action.directive";
|
||||||
import { AutofocusDirective } from "./directives/autofocus.directive";
|
import { AutofocusDirective } from "./directives/autofocus.directive";
|
||||||
import { BlurClickDirective } from "./directives/blur-click.directive";
|
|
||||||
import { BoxRowDirective } from "./directives/box-row.directive";
|
import { BoxRowDirective } from "./directives/box-row.directive";
|
||||||
import { FallbackSrcDirective } from "./directives/fallback-src.directive";
|
import { FallbackSrcDirective } from "./directives/fallback-src.directive";
|
||||||
import { InputStripSpacesDirective } from "./directives/input-strip-spaces.directive";
|
import { InputStripSpacesDirective } from "./directives/input-strip-spaces.directive";
|
||||||
@@ -48,7 +47,6 @@ import { PasswordStrengthComponent } from "./shared/components/password-strength
|
|||||||
ApiActionDirective,
|
ApiActionDirective,
|
||||||
AutofocusDirective,
|
AutofocusDirective,
|
||||||
AvatarComponent,
|
AvatarComponent,
|
||||||
BlurClickDirective,
|
|
||||||
BoxRowDirective,
|
BoxRowDirective,
|
||||||
CalloutComponent,
|
CalloutComponent,
|
||||||
ColorPasswordCountPipe,
|
ColorPasswordCountPipe,
|
||||||
@@ -78,7 +76,6 @@ import { PasswordStrengthComponent } from "./shared/components/password-strength
|
|||||||
AutofocusDirective,
|
AutofocusDirective,
|
||||||
AvatarComponent,
|
AvatarComponent,
|
||||||
BitwardenToastModule,
|
BitwardenToastModule,
|
||||||
BlurClickDirective,
|
|
||||||
BoxRowDirective,
|
BoxRowDirective,
|
||||||
CalloutComponent,
|
CalloutComponent,
|
||||||
ColorPasswordCountPipe,
|
ColorPasswordCountPipe,
|
||||||
|
|||||||
Reference in New Issue
Block a user