First Last Prev Next    No search results available
Details
: Cursor when writing/forwarding not placed in "To:" Row - ...
Bug#: 26635
: smarttemplate4
: General
Status: RESOLVED
Resolution: FIXED
: PC
: Windows NT
: unspecified
: P2
: normal
: ---

:
:
:
:
:
  Show dependency tree - Show dependency graph
People
Reporter: Engle <chrystalingus@web.de>
Assigned To: Axel Grude <axel.grude@gmail.com>

Attachments
screenshot compose view (60.90 KB, image/jpeg)
2019-01-15 07:55, Engle
no flags Details
2.1 pre 52 (540.62 KB, application/x-xpinstall)
2019-01-15 08:09, Axel Grude
no flags Details
2.1 pre 90 (511.02 KB, application/x-xpinstall)
2019-01-20 03:42, Axel Grude
no flags Details


Note

You need to log in before you can comment on or make changes to this bug.

Related actions


Description:   Opened: 2019-01-15 07:17
With activated plugin and composing an email (opposed to replying) the cursor
sits at the end of my "reply to" field. With deactivated plugin it is where I
expect it, in the "to" field (so I can start typing right away).

Is there a way to tell the plugin to put the cursor in the default "to"
position?

I am using TB's standard theme, however I am using "Thunderbird Conversations"
which alters the thread view but has no obvious (to me) effect on anything
related to composing.

Also, I am not using the %cursor% variable and only added behavior on reply,
nothing for composing.
------- Comment #1 From Axel Grude 2019-01-15 07:21:32 -------
Interesting - what you are saying is: you have a "reply-to" field displayed _at
the top_ of the address widget? So my guess is that you have a forced
"reply-to" address set in your account settings?
------- Comment #2 From Engle 2019-01-15 07:54:47 -------
(In reply to comment #1)
> Interesting - what you are saying is: you have a "reply-to" field displayed _at
> the top_ of the address widget? So my guess is that you have a forced
> "reply-to" address set in your account settings?
> 

True. I guess I got used to configuring my TB acounts like this when we started
using a collect@mydomain.com account where a bunch of addresses are forwarded
to but customers are always supposed to use the one.

I will attach a screenshot of my standard view after I click on compose/write.
Sounds like you iterate through them fields as if in an array and catch the one
after "from"!?
------- Comment #3 From Engle 2019-01-15 07:55:39 -------
Created an attachment (id=8583) [details]
screenshot compose view

forgot the attachment... obviously
------- Comment #4 From Axel Grude 2019-01-15 08:09:31 -------
Created an attachment (id=8584) [details]
2.1 pre 52

Here is a quick fixed version: I also noticed the behavior happens when I set
cc and bcc headers using %header.set(cc,<address>")% or
%header.append(bcc,<address>")%

So I made the code more universal by searching for the "To:" label - which has
the value of "addr_to" set in order to find the correct place for inserting the
addressee. I also tested this on forwarded emails. 

So this should fix the issue - please report back.

PS: I usually set the bug status to "FIXED" once I officially release the next
SmartTemplateā“ version which will contain the bugfix.
------- Comment #5 From Engle 2019-01-16 01:28:23 -------
works :) Thank you
I'm setting the bug to resolved
------- Comment #6 From Axel Grude 2019-01-20 03:14:38 -------
(In reply to comment #5)
> works :) Thank you
> I'm setting the bug to resolved
> 
I think I could do a tiny bit more: 

when you set the TO: header automatically using functions like in the following
2 examples:

%header.set(to,"Fred <fred@somemail.com>")%
%header.set.matchFromSubject(to,"Donation from .*
\((\b[a-zA-Z0-9._+-]+@[a-z0-9.-]+\.[a-z]{2,4}\b)\)",1)%

then we could potentially (and should) use the %cursor% position again as there
is no need to go into the address widget anymore?
------- Comment #7 From Axel Grude 2019-01-20 03:42:12 -------
Created an attachment (id=8587) [details]
2.1 pre 90

This version when creating new / forwarded emails - 

Checks whether "To:" already has valid email address. It uses a regular
expression with the pattern:
/(\b[a-zA-Z0-9._+-]+@[a-z0-9.-]+\.[a-z]{2,8}\b)/
which should recognize most modern email addresses.

If a valid email address is already entered, focus is going into the body of
the email (presumption is that Email doesn't need to be edited anymore if
already set by template or Thunderbird in some way)

This way all functions at:
http://smarttemplate4.mozdev.org/premium.html#headerManipulation

can be used to pre-set an email address and quickly start writing the email.
------- Comment #8 From Axel Grude 2019-07-28 06:46:31 -------
Resolved Fixed: Release 2.1 - 28/07/2019

First Last Prev Next    No search results available