Fix room input for virtual keyboard on webkit (#2346)
* Slate style has certain behavior elements that iOS expects * Swap to using that implementation
This commit is contained in:
@@ -106,22 +106,17 @@ export const CustomEditor = forwardRef<HTMLDivElement, CustomEditorProps>(
|
||||
[editor, onKeyDown]
|
||||
);
|
||||
|
||||
const renderPlaceholder = useCallback(({ attributes, children }: RenderPlaceholderProps) => {
|
||||
// drop style attribute as we use our custom placeholder css.
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const { style, ...props } = attributes;
|
||||
return (
|
||||
<Text
|
||||
as="span"
|
||||
{...props}
|
||||
className={css.EditorPlaceholder}
|
||||
contentEditable={false}
|
||||
truncate
|
||||
>
|
||||
{children}
|
||||
</Text>
|
||||
);
|
||||
}, []);
|
||||
const renderPlaceholder = useCallback(
|
||||
({ attributes, children }: RenderPlaceholderProps) => (
|
||||
<span {...attributes} className={css.EditorPlaceholderContainer}>
|
||||
{/* Inner component to style the actual text position and appearance */}
|
||||
<Text as="span" className={css.EditorPlaceholderTextVisual} truncate>
|
||||
{children}
|
||||
</Text>
|
||||
</span>
|
||||
),
|
||||
[]
|
||||
);
|
||||
|
||||
return (
|
||||
<div className={css.Editor} ref={ref}>
|
||||
|
||||
Reference in New Issue
Block a user