JSFiddle - React, Tailwind, and code Playground

by Bart Kalisz

HTML

find all inner contenteditables and check if any of them has focus

JavaScript

let currentBlockInput = {};

if (!currentBlockInput.isSameNode(document.activeElement) && document.hasFocus()) {
	console.log('block & toolbar should not be active');
} else {
	console.log('block & toolbar should active');
}