-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Drawer] position: fixed
doesn't work as intended
#3494
Comments
position: fixed
doesn't work as intended
This is related to the transform3d css directive applied to the LeftNav |
Also happens in Firefox. |
Did you guys find any workaround? |
position: fixed
doesn't work as intendedposition: fixed
doesn't work as intended
I've encountered a similar issue when using const styles = {
root: {
height: '100%',
width: this.props.width || theme.width,
position: 'fixed',
zIndex: muiTheme.zIndex.navDrawer,
left: 0,
top: 0,
transform: `translate3d(${x}px, 0, 0)`,
transition: !this.state.swiping && transitions.easeOut(null, 'transform', null),
backgroundColor: theme.color,
overflow: 'auto',
WebkitOverflowScrolling: 'touch', // iOS momentum scrolling
},
... for an explanation into the problem, a good reference is here: my solution is: <Drawer
containerStyle={{transform: 'none'}}
/> Environment: Hope it helps :) |
Looks like the solution has been posted. Closing this issue |
I would re-open this, as the solution above causes the drawer to no longer animate - including opening or closing. it just stays open. even when i set open={false} directly. |
@acao The |
I've done some playing with this, while i have the same issue - fixed position is not working inside drawer because of translate3d. When drawer is animating it has to use translateX / 3d options. But when the animation is done and drawer is open it has Would it be possible to check if x === 0 - skip this property altogether. Before starting animation - add it and animate with it? For now, i just put my fixed components out of drawer and use position: fixed & zindex higher then drawer's (1300)
Haven't checked that but i guess Drawer is stealing focus from any input inside outer fixed input . I was not able to focus but onFocus is fired. So added this:
Tried |
I have been trying to use
position: fixed
to make a div stick to the bottom of the LeftNav with the and I cannot figure it out. I created a StackOverflow question, but I don't think it's a how-to question. Something with respect to how material-ui is doing scrolling is breaking the position of the div. Can anyone see what might be wrong?This is my markup:
This is what it needs to look like:
This is what it looks like:
The text was updated successfully, but these errors were encountered: