From c5076492474b91c2bb83be2d4ed2a7820e946797 Mon Sep 17 00:00:00 2001 From: roo2 Date: Thu, 17 Dec 2020 13:31:03 +1000 Subject: [PATCH] use element that works across different versions of GB --- blocks/layout-grid/src/grid/edit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blocks/layout-grid/src/grid/edit.js b/blocks/layout-grid/src/grid/edit.js index 76cd0d16..1dce0d1a 100644 --- a/blocks/layout-grid/src/grid/edit.js +++ b/blocks/layout-grid/src/grid/edit.js @@ -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';