Skip to content

Commit

Permalink
refactor(core/form/inputs): add prop __unstable_textElementFocus
Browse files Browse the repository at this point in the history
Added a untable prop for BlockAnnotationProps to know if the retlated editor text element has focus.
This differs from form focus on the annotation object itself (markDef).
  • Loading branch information
skogsmaskin committed May 30, 2023
1 parent fbd7be8 commit 2d8aa4d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/sanity/src/core/form/types/blockProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export interface BlockListItemProps {
export interface BlockAnnotationProps {
__unstable_boundaryElement?: HTMLElement // Boundary element for the annotation, typically a scroll container
__unstable_referenceElement?: HTMLElement // Reference element representing the annotation in the DOM
__unstable_textElementFocus?: boolean // Wether the related text element (in the editor) has selection focus. Differs from form state focus.
children?: ReactNode | undefined
focused: boolean // Whether the annotation data object has form focus
markers: PortableTextMarker[]
Expand Down

0 comments on commit 2d8aa4d

Please sign in to comment.