Skip to content

Commit

Permalink
don't scroll actions when returning from input action
Browse files Browse the repository at this point in the history
  • Loading branch information
TNorbury committed Oct 30, 2023
1 parent 8d55da3 commit 1753f97
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/src/widgets/options/command_palette_body.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ class _CommandPaletteBodyState extends State<CommandPaletteBody> {
double posToScrollTo = -1;
if (selectedItemTop < scrollViewTopOffset) {
posToScrollTo = selectedItemTop;
} else if (selectedItemBottom > scrollViewBottomOffset) {
} else if (scrollViewBottomOffset != 0 &&
selectedItemBottom > scrollViewBottomOffset) {
// align bottom of item to bottom
posToScrollTo = selectedItemBottom - scrollViewHeight;
}
Expand Down

0 comments on commit 1753f97

Please sign in to comment.