Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-45815

Paste PDF into the editor from clipboard using Chrome does not work

    XMLWordPrintable

Details

    • 1
    • We collect Confluence feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      NOTE: This suggestion is for Confluence Server. Using Confluence Cloud? See the corresponding suggestion.

      Summary

      Paste PDF into the editor from clipboard using Chrome does not work.

      Environment

      • Confluence 1000.847.1 (Cloud), Confluence 6.0.3 (Server)
      • Chrome 55.0.2883.95
      • macOS Sierra

      Steps to Reproduce

      Scenario1

      1. Copy a PDF file in Finder.app
      2. Open a Confluence page in edit mode
      3. Press Cmd + V in the Confluence page

      Scenario2

      1. Open Terminal.app
      2. Execute the following commands
        $ defaults write com.apple.screencapture type pdf
        $ killall SystemUIServer
        
      3. Press Command + Control + Shift + 3 to capture a screenshot into the clipboard
      4. Open a Confluence page in edit mode
      5. Press Cmd + C in the Confluence page

      Expected Results

      The paste from the clipboard should work correctly in the both scenario.

      Actual Results

      Scenario1

      The PDF wasn't attached to the page and the filename is just pasted as a text.

      Scenario2

      The paste failed silently.
      If we monitor the step in developer tools, we can see the following JavaScript error.

      dollar.js:1 Uncaught TypeError: Cannot read property 'size' of null
          at Object.pasteFromEvent (dollar.js:1)
          at Object.onPaste (dollar.js:1)
          at Editor.<anonymous> (dollar.js:1)
          at Dispatcher.dispatch (dollar.js:1)
          at b (dollar.js:1)
          at DOMUtils.<anonymous> (dollar.js:1)
          at HTMLBodyElement.e (dollar.js:1)
      

      When it comes to some of third-party apps, they try to store images as PDF when copying them into clipboard.
      That's why these scenario should be also considered.

      Notes

      This problem might be caused by this browser's spec.
      Even though we don't support pasting PDF from clipboard, it would be more user friendly if Confluence could show some error on the UI.

      Workaround

      Use the other browsers instead.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              yokamoto Yuki Okamoto (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: