Ensure each platform behave consistently on setting clipboard with empty transferable or empty string
Categories
(Core :: DOM: Copy & Paste and Drag & Drop, defect, P3)
Tracking
()
People
(Reporter: edgar, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: webcompat:platform-bug)
- Check each platform's behavior.
- Write a test for this case.
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Comment 1•2 years ago
|
||
Android doesn't support setting empty string into clipboard, see https://searchfox.org/mozilla-central/rev/1cae9ca7cc7d17cfc92088dfc68e5ff391128caa/widget/android/nsClipboard.cpp#88-92.
Reporter | ||
Comment 2•25 days ago
|
||
We also discovered a compatibility issue with the text/html
type: we always wrap text/html
data in HTML tags when copying, even if the data is an empty string. In contrast, Chrome ignores the empty string entirely, and Safari simply writes the empty string to the clipboard without wrapping it. (See bug 1967510 comment 11 for details.)
Since we don't ignore empty strings for the text/plain
type, I think it makes more sense not to ignore them for the text/html
type either, for consistency. Instead, we should follow Safari's behavior and write the empty string without wrapping it in HTML tags.
Updated•25 days ago
|
Description
•