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.

openDrawerOffset increases right margin every open/close

See original GitHub issue

A strange bug popped up after I updated from RN 0.49 to 0.55.2

What’s wrong

When setting openDrawerOffset to anything other than 0, the content width becomes smaller than the container. This results in, every time the drawer is opened, the content width slowly shrinks. I added some screenshots as well.

I’m guessing it may be due to the rounding when calculating the offset? On iOS RCTView recently changed and this issue may have something to do with the error.

What’s expected

When the drawer is open, content should match the width of the drawer and its openDrawerOffset

Made the background a different color so you can tell easily.

First open, you can see that the content width doesn’t match the drawer

8th open, you can see it slowly shrinking

This is with 0 offset, no issues

My versions

“react”: “^16.3.1”, “react-native”: “^0.55.2”, “react-native-drawer”: “^2.5.0”,

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:28
  • Comments:22 (4 by maintainers)

github_iconTop GitHub Comments

12reactions
nguyenvanphuc2203commented, Aug 7, 2018

use type=“static” resolve this issue

11reactions
foyarashcommented, Apr 19, 2018

Temporary fix for me was to remove the parallax tween handler

Read more comments on GitHub >

github_iconTop Results From Across the Web

Consumer POS Automation - OpenClose
Comprehensive mortgage automation in an industry experiencing greater competition and margin compression to maximize profitability and sustainability amid ...
Read more >
margin-right - CSS: Cascading Style Sheets - MDN Web Docs
The margin-right CSS property sets the margin area on the right side of an element. A positive value places it farther from its...
Read more >
Word troubleshooting - Microsoft Community
It is defaulting to legal size paper and narrow margins. When I try to set up a page, I get this error message...
Read more >
Increase Left/Right Margin for Blog Post – Bard Theme
I am using the Bard Free theme. My home, about, and contact pages all look good. They have side margins. But when I...
Read more >
CSS Margin - W3Schools
CSS has properties for specifying the margin for each side of an element: margin-top; margin-right; margin-bottom; margin-left. All the margin properties ...
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