mirror of
https://github.com/TommyFang2077/dsh-desktop.git
synced 2026-08-17 09:06:36 +08:00
fix: do not cancel HTML or text paste when no image is in the event
Empty text/plain used to preventDefault before native clipboard read, which discarded HTML-only paste if no image was recovered. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -46,10 +46,13 @@ class ClipboardIngestTests(unittest.TestCase):
|
||||
self.assertIn("navigator.clipboard.read", chrome)
|
||||
self.assertIn("read_clipboard_images", chrome)
|
||||
self.assertIn("__dshDesktopIngesting", chrome)
|
||||
self.assertIn('clipboardText(e, "text/html")', chrome)
|
||||
self.assertNotIn(
|
||||
'item.kind === "file" && item.getAsFile()',
|
||||
chrome,
|
||||
)
|
||||
self.assertNotIn("steal", chrome)
|
||||
self.assertNotIn("|| !String(text).trim()", chrome)
|
||||
|
||||
|
||||
class BundledAttributionTests(unittest.TestCase):
|
||||
|
||||
Reference in New Issue
Block a user