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.

[Drawer] Height issue

See original GitHub issue

Describe the bug A clear and concise description of what the bug is.

In Drawer (and possibly Modal), when scrollBehavior is set to “inside”, Drawer doesn’t fill the height of the screen.

Expected Behavior A clear and concise description of what you expected to happen.

Drawer, when opened from sides, should completely fill the heights of the screen, even with scrollBehavior set to “inside”

Steps to Reproduce Clear and concise reproduction instructions are important for us to be able to triage your issue in a timely manner.

Use this line:

<Drawer isOpen={isOpen} placement="right" onClose={onClose} size="sm" scrollBehavior="inside">
...
</Drawer>

Suggested solution(s)

in modal.js, line 28, we have

maxHeight: props.scrollBehavior === 'inside' ? 'calc(100vh - 7.5rem)' : undefined

This is the cause of the issue. I don’t know why we have that 7.5rem there, perhaps it has something to do with Modals, but it’s breaking the Drawer.

Can we remove this line?!

Desktop (please complete the following information):

  • OS: MacOS
  • Browser Chrome
  • Version latest

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
segunadebayocommented, Jul 30, 2020

I’ve just pushed a fix for this @akiarostami. @with-heart you’re right, the drawer wasn’t connected to it’s theming and I just did that.

It should work as expected now.

@akiarostami It’s kinda tough to give a specific date. We’re currently in the rc stage of v1 and this means we’re getting pretty close to v1. I believe we’ll get it stable over the coming weeks.

1reaction
akiarostamicommented, Jul 27, 2020

hahaha… that is a comming practice @with-heart, at least whenever I go to see my doctor, that happens! 😃

I understand the “release schedule”, but since @segunadebayo said next week 2 weeks ago, I was wondering is there’s an update.

Read more comments on GitHub >

github_iconTop Results From Across the Web

100% height not working for Drawer, Material Design React
I'm trying to change it so that the Drawer will always have a height of 100%. To do this, I tried changing the...
Read more >
[Drawer] Problem with changing content container height
Having the same issue but the vh fix doesn't work for me as I have more content than the viewport height and the...
Read more >
100% height not working for Drawer, Material Design React ...
[Solved]-100% height not working for Drawer, Material Design React-Reactjs ... A percentage in css is relative to the size of its container. If...
Read more >
HTML : 100% height not working for Drawer, Material Design React ...
HTML : 100% height not working for Drawer, Material Design React [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] HTML : 100% height no ......
Read more >
SwipeableDrawer API - Material UI - MUI
SwipeableDrawer API. API reference docs for the React SwipeableDrawer component. Learn about the props, CSS, and other APIs of this exported module.
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