From 480338c9b1c415191c3eee386703ccb22759322f Mon Sep 17 00:00:00 2001 From: Daniel Richards Date: Mon, 16 Jul 2018 15:56:41 +0800 Subject: [PATCH] Use `Disabled` element to prevent interaction with Archives Block editor view Use of `pointer-events` to disable interaction was problematic. It didn't disabled the dropdown version of the block and it doesn't prevent keyboard interaction. The Disabled component handles these situations. --- core-blocks/archives/block.js | 7 ++++--- core-blocks/archives/editor.scss | 4 ---- 2 files changed, 4 insertions(+), 7 deletions(-) delete mode 100644 core-blocks/archives/editor.scss diff --git a/core-blocks/archives/block.js b/core-blocks/archives/block.js index fa433cd38b3ead..c18fbd010e98ab 100644 --- a/core-blocks/archives/block.js +++ b/core-blocks/archives/block.js @@ -6,6 +6,7 @@ import { PanelBody, ServerSideRender, ToggleControl, + Disabled, } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; @@ -18,8 +19,6 @@ import { BlockControls, } from '@wordpress/editor'; -import './editor.scss'; - class ArchivesBlock extends Component { constructor() { super( ...arguments ); @@ -75,7 +74,9 @@ class ArchivesBlock extends Component { controls={ [ 'left', 'center', 'right' ] } /> - + + + ); } diff --git a/core-blocks/archives/editor.scss b/core-blocks/archives/editor.scss deleted file mode 100644 index bcfcf25d91e532..00000000000000 --- a/core-blocks/archives/editor.scss +++ /dev/null @@ -1,4 +0,0 @@ -.gutenberg .wp-block-archives a { - pointer-events: none; - cursor: default; -}