@dotcms/react
Advanced tools
@@ -90,6 +90,11 @@ import { jsx } from 'react/jsx-runtime'; | ||
| oldInode, | ||
| inode | ||
| inode, | ||
| fieldName: focusedFieldName | ||
| } = payload; | ||
| const currentInode = contentlet.inode; | ||
| const shouldFocus = currentInode === oldInode || currentInode === inode; | ||
| const matchesInode = currentInode === oldInode || currentInode === inode; | ||
| // Match the field too: a contentlet's fields all share one inode, so an | ||
| // inode-only check focuses every editable field on the contentlet (the | ||
| // last one wins) instead of the one the user clicked. | ||
| const shouldFocus = matchesInode && focusedFieldName === fieldName; | ||
| if (shouldFocus) { | ||
@@ -104,3 +109,3 @@ var _editorRef$current2; | ||
| }; | ||
| }, [contentlet == null ? void 0 : contentlet.inode]); | ||
| }, [contentlet == null ? void 0 : contentlet.inode, fieldName]); | ||
| const onMouseDown = event => { | ||
@@ -107,0 +112,0 @@ var _editorRef$current3; |
+1
-1
| { | ||
| "name": "@dotcms/react", | ||
| "version": "1.5.5-next.2176", | ||
| "version": "1.5.5-next.2180", | ||
| "peerDependencies": { | ||
@@ -5,0 +5,0 @@ "react": ">=18", |
132092
0.26%2820
0.18%