Closed Bug 1389919 Opened 8 years ago Closed 8 years ago

Expose custom mimetypes in event.clipboardData for "paste" event

Categories

(Core :: DOM: Events, defect)

54 Branch
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: danburzo, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:54.0) Gecko/20100101 Firefox/54.0 Build ID: 20170628075643 Steps to reproduce: Copy some data to the clipboard from a system application that writes to multiple mime types. (Examples on the Mac include Sketch or most Adobe products). Listen for the `paste` event on a web page and inspect the `types` available in `event.clipboardData`. Actual results: Only basic formats such as `text/plain`, `text/html` and `Files` are available. Expected results: Additional, application specific, mime types should be exposed to the clipboard data object.
I've created a small tool to inspect the content of the clipboard to make it easier to observe browser differences: https://danburzo.github.io/clipboard-inspector/ Current status of other browsers: * Safari 10.1 exposes all available mime types * Chrome 60 displays only basic mime types (bug report here: https://bugs.chromium.org/p/chromium/issues/detail?id=487266)
Component: Untriaged → DOM: Events
Product: Firefox → Core
Do you know if this is intentional, Anne? Maybe Michael knows?
Flags: needinfo?(michael)
Flags: needinfo?(annevk)
(In reply to Andrew Overholt [:overholt] from comment #3) > https://bugs.chromium.org/p/chromium/issues/detail?id=487266#c5 seems to > indicate this should be WONTFIX. I agree with what is being said in that comment that we should WONTFIX this. I believe we expose the mandatory data types (https://w3c.github.io/clipboard-apis/#mandatory-data-types-x) mentioned in the spec right now (and if we don't then that's a separate issue), and I don't think we should be exposing other platform-specific custom data types as well.
Flags: needinfo?(michael)
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
Flags: needinfo?(annevk)
Thank you for the feedback. I agree that _unmediated_ access to reading clipboard data in custom types is not a good idea and with the lack of a spec for handling this, there's no actionable step. I've started a discussion on the topic here: https://github.com/w3c/clipboard-apis/issues/46
You need to log in before you can comment on or make changes to this bug.