Bug 211634 - Cursor position should be before the signature when 'Insert signature above quoted text' option is set
Summary: Cursor position should be before the signature when 'Insert signature above q...
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: composer (show other bugs)
Version: unspecified
Platform: openSUSE Unspecified
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-24 13:29 UTC by Pal Körössy
Modified: 2014-09-18 05:19 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.14.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pal Körössy 2009-10-24 13:29:28 UTC
Version:            (using KDE 4.3.2)
Installed from:    SuSE RPMs

If I activate the option 'Insert signature above quoted text' in Kmail/Configure/Editor/general tab, entering into the message field in Composer window the position of the cursor is after the signature, so I have to move up a few lines to write the message text. I think, the cursor position should be before the signature, at the first position of the message window.
Comment 1 Martin Koller 2009-10-26 19:18:29 UTC
To solve this, simply change the standard template to include
%CURSOR
%SIGNATURE
...
Comment 2 Pal Körössy 2009-11-01 23:14:52 UTC
I put these two parameters into the Standard templates but I cannot get the proper result I described above.

My 'Reply to All/Reply to List' Standard template is the following:
%REM="Default reply all template"%-
%CURSOR
%SIGNATURE
On %ODATE %OTIMELONG %OFROMNAME wrote:
%QUOTE

Depending on the settings
'Automatically insert signature' and
'Insert signature about quoted text'
in Configure Kmail/Editor/General tab the results are different.

If I switch 'Automatically insert signature' off, the cursor position is OK (is the first place of the text field), but no signature is inserted at all, the second line contains '%SIGNATURE' and then the quote.

If I switch the 'Automatically insert signature' parameter on, but 'Insert signature about quoted text' off, I've got the cursor in the first line, '%SIGNATURE' in the second line, then the quote and at the end the signature inserted.

But neither of the cases can I get the following order:
<cursor>
<signature>
<quote>
Comment 3 Jurian Sluiman 2009-11-17 20:26:34 UTC
For me the %SIGNATURE% doesn't work either. It's at the bottom (cursor on top) or the signature is on top, the cursor between the sig and the quoted text. Using Kontact 4.3.2, KMail 1.12.2.

If you need more information, please let me know :)
Comment 4 Pal Körössy 2012-10-11 10:32:58 UTC
(In reply to comment #1)
> To solve this, simply change the standard template to include
> %CURSOR
> %SIGNATURE
> ...

Oops, this seems to work if I also disable the option 'Automatically insert signature' at the same time.
Jurian, can I close this bug?
Comment 5 Jurian Sluiman 2012-10-11 10:35:28 UTC
Pal, I unfortunately I do not use KMail anymore :) So I cannot tell you if things got solved for me. If you can confirm the option is to disable that option and it all work fine, you can close the issue.
Comment 6 Pal Körössy 2012-10-11 14:49:30 UTC
Applying comment#1 and disabling the option 'Automatically insert signature' is definitely a workaround but it's a bit confusing for a simple user to find it out.
In my opinion there is a conflict between the 'Insert signature above the quoted text' option and the standard templates customization which needs to be resolved so I leave this open.
Comment 7 Craig 2014-02-28 04:12:20 UTC
This has been going on for 5 years and something pretty basic in usability, is it EVER going to be fixed? All we need is when insert signature automatically is enabled to have the cursor start at the top/before the signature - I migrated our entire company to KDE and KMail and every single person is complaining that they have to scroll up and click for every email they reply to or even just compose in general, the amount of time this will save is immense on top of it being an extremely basic usability function. Can someone please schedule this into one of the upcoming versions? It seems like a pretty basic fix :\ Hopefully this will get some attention as there are numerous bug reports about it, this one specifically has been open for 5 years :[
Comment 8 Craig 2014-02-28 04:32:39 UTC
Sorry for multiple, no edit apparently, wanted to add I am aware of template stuff and sure that is a workaround BUT does not work when using an HTML signature for NEW messages and beyond that I would hope workarounds wouldn't be needed as could make the default to place the cursor at the top nomatter? Why do templates not work? It messes things up, I have an HTML signature for example, I do it with templates and it has 5 spaces between the first line and the signature which I fix by placing %CURSOR%SIGNATURE as that, but with "New Messages" hitting new to start a new email places the cursor fine sure, but my signature is in plain text... Just another reason to if at all possible just fix the issue in the code to set cursor being above automatically inserted signatures by default UNLESS template provides otherwise, would help a lot of people out. You can google and see a ton of people complaining and suggesting the template work-around but again I would hope would not be necessary as could easily enough declare the default? Hopefully could get figured without having to use templates which doesn't work for all and confuses, love KMail just hope this one thing could be put in! Thanks guys.
Comment 9 Christoph Feck 2014-03-16 13:37:19 UTC
Craig, is this issue is still valid with KMail2 from 4.11 or 4.12?
Comment 10 Craig 2014-03-17 01:59:42 UTC
Hi Chris,
Thank you for replying, yes it is - I'm on Arch running the latest 4.12.x and have insert signature auto, insert Sig above quoted text both enabled and am not using templates via previous post, when clicking reply the cursor is always under the signature and I have to manually click the top of the email to start typing. This is also the same issue with many members of my company who I moved over to Contact/KMail. Any chance for a fix in an upcoming 4.13.x release? Thanks,

Craig
Comment 11 Christoph Feck 2014-04-20 17:12:13 UTC
Okey, reassigning to kmail2.
Comment 12 Iven Hsu 2014-06-27 09:12:52 UTC
*** This bug has been confirmed by popular vote. ***
Comment 13 Iven Hsu 2014-06-30 03:17:15 UTC
I've digged into the code a bit, and found that it's caused by a kdepimlibs API[1] `Signature::insertIntoTextEdit` which always perserves cursor position after inserting signatures.

I wonder if it should be fixed in kdepimlibs or in KMail, since KNode also uses this API. Any developers here could tell me about this, so I can fix it?
Comment 14 thomi_ch 2014-09-03 05:29:20 UTC
Using 4.13.3 and this issue still exists... since 2009!!!! Is it a long term Bug?

C'mon dev's, fix it soon....
Comment 15 Giuseppe Nespolino 2014-09-17 10:18:17 UTC
(In reply to thomi_ch from comment #14)
> Using 4.13.3 and this issue still exists... since 2009!!!! Is it a long term
> Bug?
> 
> C'mon dev's, fix it soon....

on 30/06/2014 Iven Hsu has proposed himself to fix this, but he needs some information. Please help him solve this!
Comment 16 Iven Hsu 2014-09-17 10:30:31 UTC
Actually I've pushed a review request for this: https://git.reviewboard.kde.org/r/120061/

But needs someone to review and merge it.
Comment 17 Laurent Montel 2014-09-18 05:19:01 UTC
Git commit edded4c9c2d3a562b9e7f18848af2d5892543823 by Montel Laurent.
Committed on 18/09/2014 at 05:17.
Pushed by mlaurent into branch 'KDE/4.14'.

Fix cursor position when 'Insert signature above quoted text' option is set

Apply patch from Iven Hsu

FIXED-IN: 4.14.2
REVIEW: 120061

M  +30   -29   kpimidentities/signature.cpp
M  +6    -2    kpimidentities/signature.h
M  +5    -4    kpimidentities/tests/signaturetest.cpp

http://commits.kde.org/kdepimlibs/edded4c9c2d3a562b9e7f18848af2d5892543823