You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ph-fritsche
changed the title
Using user.keyboard to simulate the user pasting a title text, the label of the text in clipboard is escaped
copy/paste HTML elements into contenteditable
Jan 21, 2025
Reproduction example
https://codesandbox.io/p/sandbox/clever-shockley-lkdm23?file=%2Fsrc%2FApp.js%3A10%2C34
Prerequisites
1、Renders a div whose
contentEditable
is true2、Using keyboard, simulate the user to copy a Heading elements
Expected behavior
The style of theHeading elements is retained
Actual behavior
Heading elements are escaped
![image](https://private-user-images.githubusercontent.com/88123567/301063273-cdcffe4b-2c65-4096-9361-302bf714b684.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyMjM4MTAsIm5iZiI6MTczOTIyMzUxMCwicGF0aCI6Ii84ODEyMzU2Ny8zMDEwNjMyNzMtY2RjZmZlNGItMmM2NS00MDk2LTkzNjEtMzAyYmY3MTRiNjg0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDIxMzgzMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTYzZDg5Y2E0YzViY2YxNWU5N2QxMzY0ODYwODY5ZDc0ZDI5Mzg5OGU0N2QxZWRkZWFlZWI4MTMxNzQ2M2FiMjYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.W6pfm1D-7gQBxdXuncytAl7k8Rj33_wHkxu2vrEd5Xk)
User-event version
14.5.2
Environment
@testing-library/react@^13.4.0
@testing-library/jest-dom@^5.17.0
Additional context
No response
The text was updated successfully, but these errors were encountered: