Skip to content

Commit

Permalink
fix: placeholder wrap (#3805)
Browse files Browse the repository at this point in the history
  • Loading branch information
sashuk authored Aug 14, 2023
1 parent b497bac commit ee1456a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .changeset/honest-stingrays-lick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@toptal/picasso-rich-text-editor': patch
---

### RichTextEditor

- fix placeholder wrap
15 changes: 15 additions & 0 deletions cypress/component/RichTextEditor/Default.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -455,4 +455,19 @@ describe('RichTextEditor', () => {
cy.get('body').happoScreenshot({ component, variant: 'focused' })
})
})

describe('when long placeholder string is provided', () => {
it('wraps placeholder', () => {
cy.mount(
renderEditor({
...defaultProps,
...{
placeholder: 'abcdabcdab abcabca abab aa 1 '.repeat(32),
},
})
)

cy.get('body').happoScreenshot({ component, variant: 'long-placeholder' })
})
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export default (theme: Theme) => {
top: '0px',
left: '0px',
userSelect: 'none',
whiteSpace: 'nowrap',
whiteSpace: 'normal',
display: 'inline-block',
pointerEvents: 'none',
},
Expand Down

0 comments on commit ee1456a

Please sign in to comment.