diff options
Diffstat (limited to 'vnext')
-rw-r--r-- | vnext/src/App.js | 4 | ||||
-rw-r--r-- | vnext/src/components/MessageInput.js | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/vnext/src/App.js b/vnext/src/App.js index af364fe2..a519eedd 100644 --- a/vnext/src/App.js +++ b/vnext/src/App.js @@ -91,8 +91,8 @@ export default class App extends React.Component { history.push(location); } toggleSidebar = () => { - const isMobile = window.matchMedia('width < 62.5rem'); - if (isMobile.matches) { + const isDesktop = window.matchMedia('(min-width: 62.5rem)'); + if (!isDesktop.matches) { let width = this.sidebar.current.style.width; this.sidebar.current.style.width = width === '248px' ? '0' : '248px'; let leftMargin = this.state.appMarginLeft === 'inherit' ? '250px' : 'inherit'; diff --git a/vnext/src/components/MessageInput.js b/vnext/src/components/MessageInput.js index 5766f2ac..5b603e9a 100644 --- a/vnext/src/components/MessageInput.js +++ b/vnext/src/components/MessageInput.js @@ -49,8 +49,8 @@ export default class MessageInput extends React.Component { } componentDidMount() { - const isMobile = window.matchMedia('only screen and (width <62.5rem)'); - if (!isMobile.matches) { + const isDesktop = window.matchMedia('(min-width: 62.5rem)'); + if (isDesktop.matches) { this.textarea.current.focus(); } } |