nextcloud / richdocuments

📑 Collabora Online for Nextcloud
https://nextcloud.com/collaboraonline
352 stars 116 forks source link

calc - "To paste outside Nextcloud Office, please first click the 'download' button" #4049

Open gerbrent opened 1 month ago

gerbrent commented 1 month ago

Describe the bug When copy-pasting from Nextcloud Office calc, I often get an error message when pasting the content elsewhere (i.e. local text file): To paste outside Nextcloud Office, please first click the 'download' button

  1. the phrase please first click the 'download' button is very misleading in this context - there is no download button! What does this mean in this context? Confusing for the user.

  2. This behaviour is... seems intermittent: on the same internet connection it occurs for some copy-paste tasks, but not all. Given I'm typically copy-pasting text from calc cells, this seems inconsistent and unnecessary?

issue has been persistent for 1 year+

To Reproduce Steps to reproduce the behavior:

  1. open calc doc w lots of text in cells (i.e. social media-length text, ~280 characters or more)
  2. double-click a cell into edit mode
  3. select all text (ctrl-a)
  4. copy (ctrl-c)
  5. paste into text editor locally

Expected behavior Paste the text in clipboard (i.e. the text that was copied from the cell)

Actual behaviour text pasted is: To paste outside Nextcloud Office, please first click the 'download' button

Screenshots

Client details:

Server details

Operating system: Ubuntu 22.04.4 LTS

Web server:

Database:

PHP version:

Nextcloud version: 30.0.0

Version of the richdocuments app

Version of Collabora Online 24.04.5.4

Configuration of the richdocuments app

Insert the output of `./occ config:list richdocuments` (or equivalent adapted for your runtime environment)
Logs #### Nextcloud log (data/nextcloud.log) ``` Insert your Nextcloud log here ``` #### Browser log ``` Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ... ```
elzody commented 1 month ago

I cannot reproduce it with a single cell or just a few cells, but when I select many cells at once and try to copy them all, the text To paste outside Nextcloud Office, please first click the 'download' button is pasted to my clipboard.

In the meantime, there is indeed a dialog within the spreadsheet which looks like this: image image

The dialog however doesn't seem to be visible in all cases, or even work properly most of the time. Will look into it

gerbrent commented 1 month ago

My theory, if helpful:

I believe it may have to do with internet connectivity. This happens far more when I'm on a less stable link (Starlink), or crowded wifi. Is it making a request for data on every copy action? I believe hitting ctrl-c then waiting a few moments, then switching to a local application to paste helps... but not always.

The text in a particular cell that causes this is typically a few paragraphs of text (yes, not the standard way to use cells or a spreadsheet..). Add a few emojis to the text for good measure ; )

elzody commented 3 weeks ago

@gerbrent It seems like the data to be copied is retrieved from the Collabora server via a network request which then returns the content to the browser. So, I don't necessarily doubt your theory -- on a flaky network connection, it likely won't perform very well. Maybe this is something we can look into together with Collabora to see if we can speed it up somehow or at least make it more reliable/stable even when on a flaky network connection.

When I was on the connection at Motion.Lab, I was able to reproduce the issue pretty consistently -- but on my home network, even though I'm using a personal instance hosted on another server outside my network, it's never taking more than 100ms for the request to return (which for copy-paste action is still a bit high but for me it's not noticeable)