Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should clipboard.writeText() replace \n characters with \r\n on Windows? #168

Closed
mbrodesser opened this issue Feb 3, 2022 · 3 comments
Closed

Comments

@mbrodesser
Copy link

mbrodesser commented Feb 3, 2022

Currently, Chromium seems to do that. However, it's not specified. Firefox doesn't do that.

That discrepancy was reported recently at https://bugzilla.mozilla.org/show_bug.cgi?id=1753202.

CC @snianu @BoCupp-Microsoft

@snianu
Copy link
Contributor

snianu commented Feb 3, 2022

Ah, that is correct. We do replace \n with \r\n on Windows. It is also true while writing HTML headers during standard HTML format write operation on Windows. This is also the expected behavior on Windows so I'm going to add this to the spec in #158

@mbrodesser
Copy link
Author

Makes sense. Thanks.

@snianu
Copy link
Contributor

snianu commented Mar 8, 2022

#158 has been merged. Thanks for the feedback!

@snianu snianu closed this as completed Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants