Closed Bug 1812347 Opened 1 year ago Closed 1 month ago

Cut/Copy/Paste do not work in Nextcloud Notes

Categories

(Core :: DOM: Copy & Paste and Drag & Drop, defect)

Firefox 109
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: varsites, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/109.0

Steps to reproduce:

The attached movie will show you the problem better than my typing an explanation. I was doing everything with CTRL-X, CTRL-Z, and CTRL-V.

Actual results:

See attached movie. And apologies for shaky cam!

Expected results:

Cut, undo, and, paste should work the way they do in literally every single Windows program except Firefox where half they time they do what they did in the movie.

For the movie: When I select, it's highlighted grey; when I click elsewhere, the highlight turns blue. Why? What does that mean? I have no idea. When it's blue nothing works, so what is the purpose of it turning blue at all?

Watch what happens when I tried to undo my cut using CTRL-Z - nothing. I didn't record it but same with CTRL-V - sometimes it works, sometimes nothing.

I've noticed this in every version of Firefox I've used and have certainly see other people complaining about it, but I thought perhaps seeing it visually would help the developers pinpoint why cut/copy/paste behaves the way it does in Firefox so they could sort out what's happening and hopefully fix the problem. Thanks.

Unfortunately, this report is not very useful because it does not describe the problem well. If you have time and can still reproduce the problem,
could you please add a more useful description to this report, by providing clearer and more specific steps to reproduce, as a list, step by step?
Attaching the mentioned video from the Description would be also great! Thanks!

Flags: needinfo?(varsites)

I did attach it but I guess Bugzilla has an attachment limit? I uploaded to Youtube - here's the link: https://youtu.be/vPfscncE5kI

The steps were: double-click to select text (grey), click somewhere else on the page (blue), CTRL-X (nothing), select again and CTRL-X (text is cut), CTRL-Z to undo cut (nothing).

Flags: needinfo?(varsites)

Thanks for the video, unfortunately, I do not reproduce this behavior, tried on macOS 11.7 using the latest Nightly 111.0a1 and Firefox 109 (on Gmail/Microsoft docs and some online notepad).

Please can you confirm whether you reproduce this issue using Firefox in safe mode?
http://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode

Can you also specify under what circumstances are you having this issue? Are you editing some kind of document, or sending an email?

I'm also setting this to Core > DOM: Copy & Paste and Drag & Drop so that our devs can take a look at it, if this is not the right component, please move it to a more appropriate one.

Component: Untriaged → DOM: Copy & Paste and Drag & Drop
Flags: needinfo?(varsites)
Product: Firefox → Core

I'm using Windows 10, not sure if that makes a difference or not. In the video, I'm cutting/pasting/undoing from text typing in Nextcloud Notes which is just a note-taking web app (https://github.com/nextcloud/notes). No one else is reporting this issue on their Git which is why I'm reporting it here - I'm not sure of the relationship between Firefox and the Windows clipboard and how sites interact with but I'll just say I'm able to use Nextcloud Notes in Chromium without this issue which is why I think it's something within Firefox itself.

I'll try in safe mode and report back but I'm not hopeful because I've had the same issue with a clean install, no extensions version of Firefox on Ubuntu.

Flags: needinfo?(varsites)
Summary: Cut/Copy/Paste a total mess → Cut/Copy/Paste do not work in Nextcloud Notes

(In reply to varsites from comment #4)

No one else is reporting this issue on their Git which is why I'm reporting it here

Could you write the URL of the issue here? And do you see some errors in the browser console?

Flags: needinfo?(varsites)

The issue has nothing to do with Nextcloud Notes. I just tested the exact same instance of Nextcloud Notes on Brave Browser on Ubuntu and CTRL-X, CTRL-Z, and CTRL-V worked exactly as expected. I then tested the exact same NC Notes instance in Chromium on Windows (on the same machine where the Firefox bug occurs) and it also worked perfectly.

So can you please retitle this bug as it's misleading to point the finger at NC Notes when NC Notes isn't the problem at all, but rather the problem is with Firefox's clipboard handling? Thanks.

Flags: needinfo?(varsites)
Summary: Cut/Copy/Paste do not work in Nextcloud Notes → Cut/Copy/Paste/Undo not working properly

ETA: I changed the title myself. Also I tried the browser console but when I cut/copy/undo/paste, no errors appear in the console window.

Here is a bug database of Firefox/Gecko (and broken web apps in Firefox). It's important that in which web apps Firefox has an issue. (Generic summary means that the bug is reproducible in any web apps.)

My point of the question is not whether it's reproducible in the other browsers. And in here, only you can reproduce the issue, therefore, it's important that what you see in your environment to investigate the issue. So, could you check the output in the browser console?

Flags: needinfo?(varsites)
Summary: Cut/Copy/Paste/Undo not working properly → Cut/Copy/Paste do not work in Nextcloud Notes

Ah, and also the web console's output is also necessary to investigate it.

What specifically from the web console? I just reproduced the error and nothing shows up in the console beyond the normal stuff that shows up in the console. If this helps: NC Notes is one of those save-as-you-type web apps so it's constantly updating the server of its current status. I don't know why or how that would relate to the windows clipboard though. The issue feels as if Firefox if pulling from the Windows Clipboard in either the wrong order or not at all. This is why I'm saying I don't see it as specific to NC Notes.

I can Windows-Key-V to see the clipboard history (unfortunately I can't screenshot it because it vanishes when I press another key and I can't make it stay on top) and I can see that Firefox is pulling in the wrong order. For example, I just did CTRL-X CTRL-Z a few times and watched what happened in the windows clipboard history and while cutting added it to the clipboard, undoing pulled out of order, like it undid the first thing I cut but continued CTRL-Z pulled random items from the clipboard - I could see that, instead of sequentially moving backwards, Firefox was pulling the first item, then the second, then like the 10th one down the list.

Flags: needinfo?(varsites)

(In reply to varsites from comment #10)

What specifically from the web console? I just reproduced the error and nothing shows up in the console beyond the normal stuff that shows up in the console.

Thank you. It means that at least the JS in Nextcloud Notes does not hit unexpected script error.

If this helps: NC Notes is one of those save-as-you-type web apps so it's constantly updating the server of its current status. I don't know why or how that would relate to the windows clipboard though. The issue feels as if Firefox if pulling from the Windows Clipboard in either the wrong order or not at all. This is why I'm saying I don't see it as specific to NC Notes.

The native clipboard content can be referred if paste event is fired via DataTransfer object. Web apps can handle it in low level, that may cause this kind of trouble depending on system settings, 3rd party's system utils, etc.

I can Windows-Key-V to see the clipboard history (unfortunately I can't screenshot it because it vanishes when I press another key and I can't make it stay on top) and I can see that Firefox is pulling in the wrong order. For example, I just did CTRL-X CTRL-Z a few times and watched what happened in the windows clipboard history and while cutting added it to the clipboard, undoing pulled out of order, like it undid the first thing I cut but continued CTRL-Z pulled random items from the clipboard

Undo and Redo do not work with clipboard. They are just restores/applying the changes to the DOM tree (if Nextcloud Notes uses undo manager of builtin editor of browsers. If not (this is typical web apps which contain their own editor), web apps manage the undo/redo by themselves).

Therefore, the clipboard history shouldn't be modified at undoing/redoing. It should be updated only when cutting or copying selection.

I have no idea how to collect other hints from quick testing by you.

twisniewski: Do we have a test account of Nextcloud Note or do we have contact with them?

Flags: needinfo?(twisniewski)

I think Dennis might be able to help out here.

Flags: needinfo?(twisniewski) → needinfo?(dschubert)

Testing NextCloud 28.0.4 locally on Firefox Nightly and Release, I can see no issues in NextCloud Notes. Copy, paste, cut all work as expected. I can undo actions with ctrl-z just fine. It also works just fine if I test the current NextCloud version in Firefox 109.

The closest NextCloud release in the time this issue was filed was NextCloud v24.0.9, but I couldn't get the image to work within a couple of minutes. But since it works just fine now, I'll assume this is fixed.

Status: UNCONFIRMED → RESOLVED
Closed: 1 month ago
Flags: needinfo?(dschubert)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.