Skip to content
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

[LeftNav] Fix sidebar position for browsers that don't support transform3d #1269

Merged
merged 1 commit into from
Aug 27, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/left-nav.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
const isBrowser = typeof window !== 'undefined';
let Modernizr = isBrowser ? require('./utils/modernizr.custom') : undefined;

let React = require('react');
let KeyCode = require('./utils/key-code');
let StylePropable = require('./mixins/style-propable');
Expand Down Expand Up @@ -106,7 +109,7 @@ let LeftNav = React.createClass({
width: this.getTheme().width,
position: 'fixed',
zIndex: 10,
left: 0,
left: isBrowser && Modernizr.csstransforms3d ? 0 : x,
top: 0,
transform: 'translate3d(' + x + 'px, 0, 0)',
transition: !this.state.swiping && Transitions.easeOut(),
Expand All @@ -128,6 +131,7 @@ let LeftNav = React.createClass({
right: 0,
},
};

styles.menuItemLink = this.mergeAndPrefix(styles.menuItem, {
display: 'block',
textDecoration: 'none',
Expand Down