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.

Modal animations jitter on iPhone X and 11

See original GitHub issue

If you’re using a modal that takes up part of the screen and animating it in (as in, sliding up from the bottom) then it will occasionally “jitter” (move around and appear to be vibrating) which makes it impossible to hit a tap target cleanly and is clearly just a poor UX all round.

I’ve been able to repro this on iPhone X and iPhone 11 on the simulator and physical devices.

React Native version: 0.61.2

info Fetching system and libraries information...
System:
    OS: macOS 10.15
    CPU: (4) x64 Intel(R) Core(TM) i5-8210Y CPU @ 1.60GHz
    Memory: 377.91 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 10.15.3 - /usr/local/bin/node
    Yarn: 1.16.0 - /usr/local/bin/yarn
    npm: 6.4.1 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.0, DriverKit 19.0, macOS 10.15, tvOS 13.0, watchOS 6.0
    Android SDK:
      API Levels: 26, 27, 28, 29
      Build Tools: 27.0.3, 28.0.3
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.5900203
    Xcode: 11.0/11A420a - /usr/bin/xcodebuild
  npmPackages:
    react: 16.9.0 => 16.9.0
    react-native: 0.61.2 => 0.61.2
  npmGlobalPackages:
    react-native-cli: 2.0.1
    react-native-create-library: 3.1.2
    react-native-git-upgrade: 0.2.7

Steps To Reproduce

  1. Open a modal that slides in from the bottom
  2. Observe that it will jitter around

Describe what you expected to happen: Modal animates up from the bottom cleanly and stops moving.

Snack, code example, screenshot, or link to a repository:

import RNCModal from 'react-native-modal';
export default class SimpleModal extends React.Component<SimpleModalProps> {

  render(): React.ReactNode {
    return <RNCModal
      useNativeDriver={false}
      hideModalContentWhileAnimating={true}
      style={{justifyContent: 'flex-end', margin: 0}}
      isVisible={this.props.visible}>
      <View style={{backgroundColor: Styles.colors.white, margin: 0, borderTopLeftRadius: 16, borderTopRightRadius: 16}}>
        {this.props.children}
      </View>
    </RNCModal>
  }

}

cut

I know this is a third party library, but it’s just a wrapper around the Modal component under the hood, and this is clearly a problem with react-native, since you can see this happening on yellow box modals too:

yellow

Would love help fixing this!

Cheers.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
janvdtcommented, Dec 10, 2019

any solution to this? i have the same problem

1reaction
jakebloomcommented, Nov 30, 2019

@jsartisan we ended up redesigning our UI to avoid this problem. Given how prevalent the ‘sheet’ component of SwiftUI is, this will hopefully get fixed soon

Read more comments on GitHub >

github_iconTop Results From Across the Web

Home animation lagging in iphone xr ios 15 - Apple Community
any recomendations? Animations have become laggy. Whenever I open Apps or Switch Apps from Recents Tab, The UI Becomes stuttery.
Read more >
iPhone screen or animation stutter after iOS 16 update
Some iPhone users say that their screen or animations stutter after the iOS 16 update when swiping up. Here's what we know.
Read more >
Create TALKING 3D CHARACTERS with iPhone Face ...
SUBSCRIBE if you haven't already! ▻ https://www.youtube.com/user/DualGlocks▷CHECK OUT MY NEW GLOW ANIMATION PACK + PLUGIN: ...
Read more >
Kite & Lighting Uses iPhone X in Experiment to Create 'Cheap ...
400 pounds a year is great for full body (not fingers) capture. I recently did a ton of character animations and if I...
Read more >
Why Is My iPhone Camera Shaking & How to Fix It (iPhone 14)
1. Clean your iPhone camera lens with a soft, slightly damp, lint-free cloth, preferably a lens cloth. Read How to Clean iPhone Camera...
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