Bug 1818910 Comment 13 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Chrome doesn't render the null character, so copying the selection data might not really put null character into system clipboard. I create this test that try to put string with null character into system clipboard without depending on selection.

Steps:
1. click the input element
2. press ctrl+c to copy.
3. press ctrl+v to paste.
4. check console log.

The behavior I notice is:
- If I do both copy and paste on Firefox, I don't see the issue on macOS, but Linux. (did not test Windows)
- If I do both copy and paste on Chrome, I don't see the issue on both macOS and Linux. (did not test Windows)
- On Linux, if I do copy on Firefox and paste on Chrome, Chrome get full string with null character.
- On Linux, if I do copy on Chrome and paste on Firefox, Firefox get the truncated string.

So it seems like Firefox do put the string with null character into system clipboard correctly, but somehow have some issue on reading string with null character from system clipboard on Linux?
Chrome doesn't render the null character, so copying the selection data might not really put null character into system clipboard. I create this test that try to put string with null character into system clipboard without depending on selection.

Steps:
1. click the input element
2. press ctrl+c to copy.
3. press ctrl+v to paste.
4. check console log.

The behavior I notice is:
- If I do both copy and paste on Firefox, I don't see the issue on macOS, but Linux. (did not test Windows)
- If I do both copy and paste on Chrome, I don't see the issue on both macOS and Linux. (did not test Windows)
- On Linux, if I do copy on Firefox and paste on Chrome, Chrome get full string with null character.
- On Linux, if I do copy on Chrome and paste on Firefox, Firefox get the truncated string.

So it seems like Firefox do put the string with null character into system clipboard correctly, but somehow has an issue on reading string with null character from system clipboard on Linux?

Back to Bug 1818910 Comment 13