File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -567,18 +567,18 @@ export const Editor = forwardRef<EditorHandle, EditorProps>(function Editor(
567567 * 1. **Locked mode** – when the editor is read-only (`locked` is `true`),
568568 * the callback is a no-op so that clicking the padding area does not
569569 * steal focus or move the cursor.
570- * 2. **Inside `.bn-editor `** – if the click originated inside the
571- * contenteditable region (including any descendant elements), the
572- * callback returns early and lets the default browser behaviour handle
573- * focus normally.
570+ * 2. **Inside `.bn-container `** – if the click originated inside the
571+ * BlockNote container (including the editor, toolbars, menus, and other
572+ * UI overlays), the callback returns early and lets the default browser
573+ * behaviour handle focus normally.
574574 *
575575 * @param e - The React mouse event from the wrapper `<div>`.
576576 */
577577 const handleWrapperClick = useCallback (
578578 ( e : React . MouseEvent < HTMLDivElement > ) => {
579579 if ( locked ) return
580580 const target = e . target as HTMLElement
581- if ( target . closest ( '.bn-editor ' ) ) return
581+ if ( target . closest ( '.bn-container ' ) ) return
582582 if ( target . closest ( '[role="dialog"]' ) ) return
583583
584584 const lastBlock = editor . document [ editor . document . length - 1 ]
You can’t perform that action at this time.
0 commit comments