Bugzilla@Mozdev – Bug 26635
Cursor when writing/forwarding not placed in "To:" Row - if reply-to is set
Last modified: 2019-07-28 06:46:31
You need to log in before you can comment on or make changes to this bug.
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.
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?
(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"!?
Created an attachment (id=8583) [details] screenshot compose view forgot the attachment... obviously
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.
works :) Thank you I'm setting the bug to resolved
(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?
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.
Resolved Fixed: Release 2.1 - 28/07/2019