Skip to content

Commit f85fa3f

Browse files
committed
fix: prevent dropdown item from scrolling the page when navigating using arrow keys
Signed-off-by: Akshat Patel <akshat@live.ca>
1 parent abc0491 commit f85fa3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dropdown/list/dropdown-list.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ export class DropdownList implements AbstractDropdownView, AfterViewInit, OnDest
519519
}
520520
} else if (event.key === "ArrowUp") {
521521
if (this.hasPrevElement()) {
522-
this.getPrevElement().scrollIntoView();
522+
this.getPrevElement().scrollIntoView({ block: "nearest" });
523523
} else {
524524
this.blurIntent.emit("top");
525525
}

0 commit comments

Comments
 (0)