-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Thunderbird 115 has issues with inserting templates when the cursor is at the end of a font tag directly before a hidden line break #377
Comments
It works here. I would need a step by step description of what the user is doing and what happens (or not). Errors logged to the console would be helpful. Also please try in a fresh profile with a test template. |
He has a group called Signatures with the signatures in HTML within that group as templates. This makes a button called Signatures he clicks on whenever he types his message or reply. When he clicks the button and selects a signature, nothing gets inserted. Instead, the cursor where he wants the signature inserted disappears. When I click on the message body where the cursor was, it has moved up a line. This has worked fine in the past and this is how he has done it for a couple of years now at least. [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIHTMLEditor.insertHTML]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://quicktext/content/quicktext.js :: insertBody :: line 530" data: no] quicktext.js:530:22 |
Can you send me the template in question? If it includes confidential information, please send it to my email directly. But I need a template - when imported into a fresh profile - triggers the bug reproducibly. |
Email sent from the user affected. |
I still cannot reproduce it :-( All your signatures work. I opened a new email, typed something into the composer and then was able to insert all his signatures one after the other. Please create a new Thunderbird Test-Profile, import the templates + scripts and try it in the new profile. |
Steps for Troubleshooting: |
I have a similar issue. When I insert a template inside the body before other contents or in the title, all works fine, but when I try to insert a template at the bottom of the body, it doesn't work. I now work around this by typing a dot or dash and then moving cursor right before this character before inserting my template. This is a new issue that just started for me after installing TB 115. |
Created a fresh profile. Added one email account. Installed QuickText and ReplyWithHeader add-ons. Same error. Tried again without installing ReplyWithHeader. Same error. NOW though if I insert a signature in a new mail and immediately try to insert a signature after that first signature, I can keep adding them. BUT, if I hit enter to make a new line, I cannot insert any signatures. Weird. So type a new message, hit ENTER twice, and try to insert the HTML signature. It won't insert anything. Start a new email but don't type anything yet, click on the message body, insert HTML signature, and now it will insert and keep inserting as long as the ENTER key is not pressed. |
I was able to reproduce the effect after hitting ENTER. Will investigate. |
The WebExtension version of QT has the same issue, so it is caused by the editor itself. We have to find a way around this bug. Can you confirm it is triggered by If not, please reduce the offending templates until you could identify the part of the template, which is causing this for you. |
Please also check if the template is syntactically correct. In the test templates I received, some font tags have not been closed and that caused additional issues. |
While not a fan of this issue's title, I recently upgraded to TB 115.2.2 (from 102) and lost the ability to insert HTML QuickText after any text written in an e-mail. Inserting the QT as the only text in an HTML reply works fine, as does inserting plain text below written plain text, but not below other rich (HTML) text. My QT HTML is pretty boring:
|
What happens if you add a p-tag around it? Or a div-tag?
|
@ViperGeek : I do not seem to be able to reproduce your issue. Please create a dedicated issue with steps to reproduce (as detailed as possible) |
I improved the steps for Troubleshooting here: I added the following and I think its relevant for all of you. @BT-Justice @EcovoyCan @ViperGeek 5. Reduce as far as possibleIf there is a problem inserting a large Quicktext template into a long email, try to reduce the problem as much as possible.
6. Create an issue[...]
|
Thanks! |
@jobisoft I updated the HTML, and it still will not work after typing a message, hitting enter twice, and then trying to insert a HTML signature from QuickText. I am sure it is something with the new Thunderbird 115 SuperNova version as everything worked fine for years. Apparently, you cannot revert to an older version of Thunderbird after upgrading to SuperNova. @SamuelPlentz Thanks for your concern, but we are past the user error stage so no longer relevant to me. A bug has been discovered. Here is an example of the HTML code used for one of the signatures which worked fine for years that has been anonymized (this clipboard will delete after 10/16/2023): |
What does the updated HTML template look like?
It is undoubtably due to changes in the editor code (which is not Thunderbird code by the way, but code inherited from Firefox). But not all templates are broken, and we need to find out what tags/html is triggering this error. So please do follow Samuel's advice and reduce your templates to the point where it works again, so we can identify the offending elements. |
@jobisoft All of the ones for my client do not work AFTER he types a message, hits ENTER twice, and then tries to insert a signature. They all work if he clicks the message body before typing a reply, inserts a signature, goes to the start of the signature, hits enter twice, goes back up, changes his font and size, and types his message. Reducing the HTML code doesn't make them start working again. I took them all the way down to just having The only fix I have for my client who needs his signatures to work for his business was to add:
...above the same HTML signatures. He can now type a message and at the end of his message, just select the HTML signature he wants which creates the signature 2 lines below his message as it used to be or insert the signature first then type a reply above the signature: |
My current understanding is: QT fails, if the existing message in the composer before the cursor has a font tag. See #378
This still fails for me from time to time. |
@jobisoft My "fix" only works if you either do it right at the end of the last sentence typed or insert the signature in the message body before typing anything. |
Understood. Can you try if removing all font tags (select all and set as "Variable Width" font) before inserting a signature also fixes the issue (not as a workaround, but as the cause identification)? |
I investigated in more detail what exactly is the offending situation: If the cursor is before a hidden br at the end of a font tag. You can play around with this using my HTML Source Editor:
If you save this html and then move the cursor to the end of the text, you will end up behind "zouf". The br is hidden, you cannot get on the next line. So the cursor is before the br. Inserting templates will fail. Any of the following will make inserting templates work again:
While it is tedious to remove trailing br's from the message before inserting templates, it may be a simple workaround to simply add a space wherever you currently are with your cursor (and where you want to add the template) and then go back one char to the left (so the space is behind the cursor) and then add the template. Can you help me and play with your templates and the html source editor to confirm my findings? I will try to automate the removal of trailing br's before adding the template. |
Confirmed! Deleting the trailing |
If you are on a new line, you need to remove all font tags from that line. This is the bad situation:
This is the fixed one:
It does need the |
Since the recent upgrade in Mint Cinnamon to TB115.3.1 QuickText requires that I hit return and create as many new lines as the signature needs before it will insert. Very annoying. It won't just insert itself and move other content down. |
I filed a Thunderbird bug: |
I have a client I do computer work for who uses this extension. Since the upgrade to Thunderbird 115, it doesn't seem to be working well. When he types up an email and goes to QuickText to select a signature, it will not go into the message body. If he selects a signature before typing, it seems to work, but (as a test) clicking to add another signature doesn't work.
The text was updated successfully, but these errors were encountered: