Description
In this code in inline-combobox.tsx, the point ref has no effect since its immutable current property is immediately stored on a plain React ref.
|
React.useEffect(() => { |
|
const path = editor.api.findPath(element); |
|
|
|
if (!path) return; |
|
|
|
const point = editor.api.before(path); |
|
|
|
if (!point) return; |
|
|
|
const pointRef = editor.api.pointRef(point); |
|
insertPoint.current = pointRef.current; |
|
|
|
return () => { |
|
pointRef.unref(); |
|
}; |
|
}, [editor, element]); |
This was added from #4031 (comment). I'm not sure whether this mistake will result in any bugs (possibly an incorrect insertion point in a collaborative editor?), but I thought it best to flag it just in case.
Reproduction URL
No response
Reproduction steps
Plate version
52.0.8
Slate React version
0.117.4
Screenshots
Logs
Browsers
No response
Description
In this code in
inline-combobox.tsx, the point ref has no effect since its immutablecurrentproperty is immediately stored on a plain React ref.plate/apps/www/src/registry/ui/inline-combobox.tsx
Lines 109 to 124 in fe60ce8
This was added from #4031 (comment). I'm not sure whether this mistake will result in any bugs (possibly an incorrect insertion point in a collaborative editor?), but I thought it best to flag it just in case.
Reproduction URL
No response
Reproduction steps
Plate version
52.0.8
Slate React version
0.117.4
Screenshots
Logs
Browsers
No response