Skip to content

Commit

Permalink
use element that works across different versions of GB
Browse files Browse the repository at this point in the history
  • Loading branch information
roo2 committed Dec 17, 2020
1 parent dbe5ada commit c507649
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion blocks/layout-grid/src/grid/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const MINIMUM_RESIZE_SIZE = 50; // Empirically determined to be a good size
* get the width of the editor, taking into account preview mode.
*/
function getEditorDeviceWidth() {
const visualEditorEl = document.querySelector('.edit-post-visual-editor');
const visualEditorEl = document.querySelector('.editor-styles-wrapper');
const width = visualEditorEl ? visualEditorEl.offsetWidth : window.innerWidth;
if ( width < 600 ) {
return 'Mobile';
Expand Down

0 comments on commit c507649

Please sign in to comment.