question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[v4] Request: smoother keyboard transition when the bottom sheet is dismissed programmatically

See original GitHub issue

Feature Request

Currently, when the bottom sheet is dismissed via the dismiss method while the keyboard is open, the sheet first slides all the way under the keyboard, and the keyboard then stays on screen for about a second before disappearing.

This feels like a performance issue from the UX perspective, and it would be great if the keyboard started sliding down along with the bottom sheet at the same time, thus eliminating the delay.

Demo of the current behavior:

https://user-images.githubusercontent.com/12449725/133307532-c01d43bd-025c-4f5c-9d87-5af074d5b28a.mp4

Why it is needed

Possible implementation

Code sample

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:6
  • Comments:33 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
hirbodcommented, Mar 22, 2022

@mattgabor why are you using patch-package for this?

import { BottomSheetBackdrop, BottomSheetBackdropProps, BottomSheetModal } from '@gorhom/bottom-sheet';

const renderBackdrop: React.FC<BottomSheetBackdropProps> = (props) => {
  return (
    <BottomSheetBackdrop {...props} appearsOnIndex={0} disappearsOnIndex={-1}>
      <Pressable onPress={Keyboard.dismiss} style={{ flex: 1}} />
    </BottomSheetBackdrop>
  );
};

<BottomSheet
    ...
    backgroundComponent={renderBackground}
>
...
3reactions
jzxchiang1commented, Feb 14, 2022

What if you don’t use a ScrollView? I get this issue even when I just have a vanilla View inside of the BottomSheetModal.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I dim the background when Bottomsheet is displayed ...
Using BottomSheetDialogFragment causes some janky animation. When showing the keyboard the DialogFragment just "snapps" to it's new position. BottomSheet ...
Read more >
Android Bottom Sheet Behavior and Animated Button on Top ...
Bottom Sheets are surface components that hold supplementary content. It mostly anchored the bottom of the screen. In simple words, you can ...
Read more >
How To Present a Bottom Sheet View Controller in iOS
A bottom sheet modal view controller is a feature that has a great UI/UX design. It is very useful when we want to...
Read more >
Control and animate the software keyboard
// Record the position of the view after the IME transition. endBottom = view.bottom.toFloat()
Read more >
Hide Keyboard - SwiftUI Handbook - Design+Code
Use a View extension to dismiss the keyboard when the user taps outside of the keyboard area.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found