Undo in notes not working as expected after pasting text

In notes, it does work as undo if I write something with the keyboard and use it, but once I paste something with CTRL + C, It stops working as it should, it no longer does undo. Its just scrolls the website to the top instead of undoing anything.

Does this happen to anyone else?

I am using Gramps 5.2.2 Windows AIO

Bonus question:
What is middle mouse click supposed to do when editing a note?

Had a type on the title, fixed it, well, missed a word.

I noticed such a behaviour under Fedora 39 (Linux). It also happens after drag-and-drop. Sometimes pressing Ctrl+Z multiple times seems to end up succeeding. There is no obvious rule about the number of presses. In the case of drag-and-drop, the first succeeding press removes the “paste” step and the next one restores the “cut” step.

1 Like

After some testing its much worse when pasting links, than it is when pasting text

If this GIF works on the forum, here is an GIF of it:

Gramps-Undo-not-working-as-it-sh

Pasting in a link, and pressing undo 3 times, every time it jumps to the top, but the link is still there. I think it would have worked eventually if I pressed enough times, but it doesnt seem to be consistent to me.

The Undo/Redo in the Notes Editor is very limited. (And a bit wonky!) It only has a single level of undo, not a fill history. So I suspect that it considers a paste to be a multi-step process.

This is a bug. Every time you move the mouse over the link a hypertext tag is added and removed. These tags are actually undoable.

Is there a bug report for this?

What do you mean single level undo? if you write something normally one place, change cursor, write something more, it can undo one of them and then the other.

As I said, it seem to be worse when pasting a link than pasting just text. So it probably consider pasting more than one step, and making the link clickable at least one step more. Would it be possible to do so it only counts as one step?

The jumping to the top of the note is also quite irritating to me. and seem separate from pasting, as it happens even if you just type something at the bottom normally and press undo. Sure, if you just type something you are probably less likely to use undo than if you paste something in, is my guess, but dont know.

But both things in combination make it even more irritating, pasting things require multiple undos would be more bearable if it didnt jump to the top. Same thing other way around, jumping to the top would be less irritating if undo worked as I would expect.

I didnt find any, but maybe I didnt search for the right things. I can go and create one or two.

1 Like

I can’t find any either. Please create one for each issue.

I have a fix for the multiple undo required. I’ll see if I can reproduce the jumping to the first line of the editor issue.

Update: I can reproduce the jumping to the first line of the editor issue, but I don’t what is causing the window to scroll.

1 Like

Multiple undo issue:
0013267: Undo in Notes not working as expected after pasting, especially after pasting links. Requires multiple undos from one action.

Editor jumping to the top of the note issue:
0013268: [Notes editor] Undo action in Notes editor scrolls the editor to the top/first line.

2 Likes

@Nick-Hall Nick, does this need to be 2 reports?

You said that “Every time you move the mouse over the link a hypertext tag is added and removed.” It that a separate bug that confuses the Undo History?

You said that “I have a fix for the multiple undo required.” That (sort of) seems to match the second part of 0013267. But the “not working as expected after pasting” , that seems separate.

Yes. I have a fix for #13267, but not #13268.

I meant, does 0013267 need to be subdivided?