After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 748372 - Cursor jumps around in composer wildly. Undo doesn't work. Text randomly deleted.
Cursor jumps around in composer wildly. Undo doesn't work. Text randomly dele...
Status: RESOLVED OBSOLETE
Product: evolution
Classification: Applications
Component: Composer
3.16.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: Tomas Popela
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2015-04-23 15:28 UTC by David Woodhouse
Modified: 2020-04-27 14:21 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description David Woodhouse 2015-04-23 15:28:15 UTC
I don't quite know how to describe what just happened, especially without expletives.

I was sent a list of questions in a word file. I pasted them into a (plain text) reply using 'Paste Quotation'.

Each question is on a separate line. I place my cursor at the question at the end of a line, and hit 'enter'. A blank line appears below the question mark where the cursor was. So far so good. Except the cursor seems to jump a few lines *up*. So if I wasn't looking, and I just hit 'enter' then start typing the answer, the answer ends up in a bizarre place.

I try hitting Ctrl-Z to undo, but it doesn't always undo the last thing I did. It doesn't undo the blank line that I created, but it *does* start deleting other text that I'd typed before that.

And an entire line (of quoted question) just disappeared while I was typing, I have no idea why that happened. The composer seems to be malicious in ways I cannot quite comprehend.
Comment 1 David Woodhouse 2015-04-23 15:38:56 UTC
Oh, and a new one. Place cursor on a blank line that I *have* managed to put between cited questions, and attempt to make another blank line there by pressing 'enter'. Nothing is inserted, but the cursor jumps to the *bottom* of the email, underneath my .signature.
Comment 2 David Woodhouse 2015-04-23 15:40:16 UTC
Yay, finally managed to get it to let me type text in the right place. It didn't word-wrap. I changed from 'Normal' to 'Preformatted' and back again, and *now* it does...
Comment 3 David Woodhouse 2015-04-23 16:06:24 UTC
When the cursor has jumped to the bottom randomly and I've typed, I have to be careful of pressing backspace. It randomly jumps back up higher (not to where it came from; that would be too predictble) and starts deleting other text. And one of the questions just became "unquoted", with the '>' at the start of the line disappearing.
Comment 4 David Woodhouse 2015-04-23 16:07:57 UTC
Oh, it gets better. I thought I'd try saving it as a draft, then re-opening it.

When I double-click the mail in my Drafts folder to re-open it, it isn't all there. I only get up to the first question, and my first answer. The second citation and anything after that are gone.
Comment 5 Tomas Popela 2015-04-27 07:17:29 UTC
Hi David,
thank you for you comments. Please open new bug reports on each of your issues and describe necessary steps to reproduce it (if it's possible please attach test message as well) and mark them as blockers of this bug.
Comment 6 David Woodhouse 2015-04-27 10:52:09 UTC
Many of these issues are going to turn out to be related, and there are so many that it is hard to separate and identify them clearly.

Please could you start by reproducing this the way I described — take a document such as the one at http://david.woodhou.se/bug748372.docx and select its contents in LibreOffice. The use 'paste quotation' into an Evolution compose window, and attempt to insert an answer between each of the cited questions.

Once you get to the point where that isn't *entirely* unusable and doing a differently bizarre and broken thing on *every* keypress, I'll be happy to try it again and file separate bugs for any remaining issues. But for now it's just too hard.
Comment 7 David Woodhouse 2015-04-27 12:21:37 UTC
As noted on IRC, I'm not even sure that the jumping cursor, the undo failures, and the failure to reload the saved draft aren't all aspects of the same underlying problem.

I just tried a simple test, typing a few words into a new composer and then pasting a URL under them (into the blank line between text and .signature).

The cursor jumped to the bottom, underneath the .signature. And then hitting Ctrl-Z to 'undo' also deleted the .signature as well as the pasted URL. So maybe the undo problems are related to the jumping cursor.

(Hitting 'Redo' didn't put the missing .signature back again either, FWIW.)

It's entirely feasible that the failure to save a correct document structure (or to reload it) is *also* a manifestation of the same problem.
Comment 8 Tomas Popela 2015-04-27 14:04:55 UTC
(In reply to David Woodhouse from comment #0)
> I don't quite know how to describe what just happened, especially without
> expletives.
> 
> I was sent a list of questions in a word file. I pasted them into a (plain
> text) reply using 'Paste Quotation'.
> 
> Each question is on a separate line. I place my cursor at the question at
> the end of a line, and hit 'enter'. A blank line appears below the question
> mark where the cursor was. So far so good. Except the cursor seems to jump a
> few lines *up*. So if I wasn't looking, and I just hit 'enter' then start
> typing the answer, the answer ends up in a bizarre place.
> 

This should not happen after following change:

    EHTMLEditorView - Fix the 'Paste Quotation' action
    
    The pasted and quoted text was wrongly inserted into another PRE element
    that caused another parts of editor to misbehave (as it should be inserted
    straight into BODY element). Also the pasted content was not preprocessed at
    all before it was pasted and that also caused some undefined behaviour as well.

commit 08711c97c457bbfa96a6dbe8974170585cc9233f in the master branch for Evolution 3.17.2+

commit 3702e1a182286ca02468fa2fa19ad2ee5c0e3399 in the gnome-3-16 branch for Evolution 3.16.2+.
Comment 9 Tomas Popela 2015-04-28 07:46:50 UTC
(In reply to David Woodhouse from comment #7)
> I just tried a simple test, typing a few words into a new composer and then
> pasting a URL under them (into the blank line between text and .signature).
> 
> The cursor jumped to the bottom, underneath the .signature. And then hitting
> Ctrl-Z to 'undo' also deleted the .signature as well as the pasted URL. So
> maybe the undo problems are related to the jumping cursor.

This is fixed with following commits:

   EHTMLEditorView - New line from the beginning of pasted text lost when pasting
    
   This also fixes wrong caret position after pasting any text in composer.

commit 20241220fd36d7c4edf437609fa3d1043cdde4bc in the master branch for Evolution 3.17.2+

commit 0081ffdc3ec3ace7a220f1112351dcbbe2077596 in the gnome-3-16 branch for Evolution 3.16.2+.

This also fixes the wrong 'undo' behavior in this case as it saved the position of the caret after the paste (the caret was on wrong place) and when it tried to undo this operation it started from the wrong point.
Comment 10 Drew Parsons 2017-01-20 08:56:03 UTC
I've been suffering from just the kind of problems described here. Email editing is still dangerous and unreliable in evolution 3.22.4.  The behaviour is so incomprehensible, it's hard to know where to start reporting the bug.

The most consistent problem is that whenever I highlight text and copy, the text gets deleted when I paste or when I click the mouse somewhere else in the wind.  The only way to stop the highlighted text being deleted is to first dehighlight it by moving the cursor with the arrow keys.
Comment 11 Christian Gogolin 2017-04-04 10:37:03 UTC
I am suffering from the same kind of problems with 3.22.6 and they are very annoying.

Two concrete ways to trigger such a strange behavior are the following:

1) Write some text containing several paragraphs and blank lines in Google docs. Copy it with with Ctrl-C from the browser window and past it into a reply-to-message window in Evolution. Put the cursor on the beginning of a blank line between paragraphs and press return. Instead of adding a blank line in place, the cursor jumps to the bottom of the message and inserts a blank line below the pasted text.

2) Copy some text from a webpage, for example the firs two paragraphs from my website www.cgogolin.de "I am working..." with Ctrl-C. Open a new message window, place the cursor on the first line and hit Ctrl-V. Nothing happens. Hitting Ctrl-V in rapid succession, eventually the text is pasted. but the -- separator of the signature ends up on the same line as the last line of the pasted text instead of staying on a line of its own below. Now place the cursor on the blank line between the two paragraphs, i.e., before "I finished my..." and hit return. Instead of adding a blank line between the paragraphs, the cursor jumps to the very bottom of the message, even below the signature, and a blank line is inserted there.  

Now that I know this bug exists I can add more concrete examples as they occur while using Evolution.
Comment 12 Maciej Mrozowski 2017-08-16 13:09:30 UTC
I also confirm all the behaviour described by OP and other commenters with:
evolution-3.24.5-1.fc26.x86_64
evolution-ews-3.24.5-1.fc26.x86_64
on Fedora 26.
Comment 13 Maciej Mrozowski 2018-03-15 19:33:15 UTC
Undo and text pasting is completely broken, restoring not recently edited lines, removing random text etc.
Using composer is dangerous thing to do. Is it possible to get some priority on this?
I already developed habit to avoid CTRL+Z, and whenever I need to, I just copy all my text, edit it in kate, and paste back to Evolution once ready.
(I cannot use external editor because that would also feed it with contents below signature, while I just want to edit my contents, not the quoted text)
Comment 14 Milan Crha 2020-04-27 14:21:35 UTC
A lot of things had been changed for 3.37.2, where the composer code had been rewritten to use JavaScriptCore API. I'm closing this in favor of that change. Please retest with that.