diff --git a/client/components/sticky-panel/index.jsx b/client/components/sticky-panel/index.jsx index 0e18761ddea45..0cd9cd535212c 100644 --- a/client/components/sticky-panel/index.jsx +++ b/client/components/sticky-panel/index.jsx @@ -14,11 +14,24 @@ var viewport = require( 'lib/viewport' ); module.exports = React.createClass( { displayName: 'StickyPanel', + propTypes: { + minLimit: React.PropTypes.oneOfType( [ + React.PropTypes.bool, + React.PropTypes.number, + ] ), + }, + + getDefaultProps: function() { + return { + minLimit: false, + }; + }, + getInitialState: function() { return { isSticky: false, spacerHeight: 0, - blockWidth: 0 + blockWidth: 0, }; }, @@ -53,7 +66,10 @@ module.exports = React.createClass( { updateIsSticky: function() { var isSticky = window.pageYOffset > this.threshold; - if ( viewport.isMobile() ) { + if ( + this.props.minLimit !== false && this.props.minLimit >= window.innerWidth || + viewport.isMobile() + ) { return this.setState( { isSticky: false } ); } diff --git a/client/my-sites/media-library/header.jsx b/client/my-sites/media-library/header.jsx index 1c9bc69cf46e1..539eb0fc5595f 100644 --- a/client/my-sites/media-library/header.jsx +++ b/client/my-sites/media-library/header.jsx @@ -140,7 +140,7 @@ export default React.createClass( { if ( this.props.sticky ) { return ( - + { card } );