Skip to content

Commit

Permalink
fix(designer-ui): Prevent field placeholder from being used as title …
Browse files Browse the repository at this point in the history
…on HTML toolbar (#4812)

* Prevent placeholder from being used as HTML toolbar title

* Lint files
  • Loading branch information
ek68794998 committed May 8, 2024
1 parent 753037e commit cbe47f6
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions libs/designer-ui/src/lib/editor/base/index.tsx
Expand Up @@ -173,13 +173,7 @@ export const BaseEditor = ({

return (
<>
<div
className={className ?? 'msla-editor-container'}
id={editorId}
ref={containerRef}
data-automation-id={dataAutomationId}
title={placeholder}
>
<div className={className ?? 'msla-editor-container'} id={editorId} ref={containerRef} data-automation-id={dataAutomationId}>
{htmlEditor ? (
<Toolbar
isRawText={htmlEditor === 'raw-html'}
Expand All @@ -190,7 +184,12 @@ export const BaseEditor = ({
) : null}
<TextPlugin
contentEditable={
<ContentEditable className={css('editor-input', readonly && 'readonly')} ariaLabelledBy={labelId} ariaDescribedBy={id} />
<ContentEditable
className={css('editor-input', readonly && 'readonly')}
ariaLabelledBy={labelId}
ariaDescribedBy={id}
title={placeholder}
/>
}
placeholder={
<span className="editor-placeholder" ref={placeholderRef}>
Expand Down

0 comments on commit cbe47f6

Please sign in to comment.