From d3c4425d4fa15ff4781f46de5fb925767e2b0d5e Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Fri, 12 May 2017 08:40:44 -0400 Subject: [PATCH] Unassign click handlers from disabled mover buttons --- editor/block-mover/index.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/editor/block-mover/index.js b/editor/block-mover/index.js index 1a465f0c8f9533..3e3cb24ba83494 100644 --- a/editor/block-mover/index.js +++ b/editor/block-mover/index.js @@ -15,17 +15,22 @@ import './style.scss'; import { isFirstBlock, isLastBlock } from '../selectors'; function BlockMover( { onMoveUp, onMoveDown, isFirst, isLast } ) { + // We emulate a disabled state because forcefully applying the `disabled` + // attribute on the button while it has focus causes the screen to change + // to an unfocused state (body as active element) without firing blur on, + // the rendering parent, leaving it unable to react to focus out. + return (