Currently it is pretty easy to delete a note accidentally. A confirmation question would avoid this.
Better than a confirmation would be an undo function (a message at the top of the app that hides after ~5 sec.)
I think it can be discussed, whether this is really better than a question.
Personally I never liked the approach of an undo function, I prefer preventing an unwanted action rather than offering an option to revert it later.
However this approach is used on many other sites and might be easier to integrate into the current UI.
In addition, @jancborchardt considered to put the delete button in a 3-dot-menu, see #38. This would reduce the likelihood to hit the button by accident.
We should definitely go with undo, as is also planned for the server and other apps. See the main issue at https://github.com/nextcloud/server/issues/3216 and cc @ChristophWurst who worked on an implementation.
I just deleted a set of notes by accident...
@waeltken can you open a separate issue and provide further info?
(Also just removed some comments related to the Android app which were separate from this topic.)
There is a CSS style for implementing this, available since NC12:

https://docs.nextcloud.com/server/13/developer_manual/design/navigation.html#undo-entry
I just hit this issue with a key combination.
I was undoing the edits I made on a note and I realized that my last CTRL+Z returned the whole note to a "new" status.
Is this related or should I file a new issue?
@rodrigoaguilera
That sounds like intended behavior: if you create a note, write some text and then press CTRL+Z (undo) multiple times, the note will be empty at some point. That's a feature from your browser. However, typically the browser provides CTRL+Y for redo the changes for which you've done an undo before. At least Firefox has this key command.
If you think that this is a problem of the notes app, please open a new issue, where we can discuss this. This issue is about deleting the whole note which is different.
Most helpful comment
Better than a confirmation would be an undo function (a message at the top of the app that hides after ~5 sec.)