Skip to content

Commit 614ace4

Browse files
committed
fix(searchbar): set a negative tabindex for the cancel button
this prevents tabbing to the cancel button and shifting the entire screen.
1 parent fef6a5f commit 614ace4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/searchbar/searchbar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ import {isPresent} from '../../util/util';
4141
'<input #searchbarInput [(ngModel)]="_value" [attr.placeholder]="placeholder" (input)="inputChanged($event)" (blur)="inputBlurred($event)" (focus)="inputFocused($event)" class="searchbar-input">' +
4242
'<button clear class="searchbar-clear-icon" (click)="clearInput($event)" (mousedown)="clearInput($event)"></button>' +
4343
'</div>' +
44-
'<button #cancelButton clear (click)="cancelSearchbar($event)" (mousedown)="cancelSearchbar($event)" [hidden]="hideCancelButton" class="searchbar-ios-cancel">{{cancelButtonText}}</button>',
44+
'<button #cancelButton [tabindex]="_isActive ? 1 : -1" clear (click)="cancelSearchbar($event)" (mousedown)="cancelSearchbar($event)" [hidden]="hideCancelButton" class="searchbar-ios-cancel">{{cancelButtonText}}</button>',
4545
encapsulation: ViewEncapsulation.None
4646
})
4747
export class Searchbar {

0 commit comments

Comments
 (0)