Closed Bug 1665025 Opened 5 years ago Closed 5 years ago

After editing input-pill: Empty string passed to getElementById(). MsgComposeCommands.js:194:29

Categories

(Thunderbird :: Message Compose Window, defect)

defect

Tracking

(thunderbird_esr78- fixed, thunderbird80 wontfix, thunderbird81 wontfix)

RESOLVED FIXED
82 Branch
Tracking Status
thunderbird_esr78 - fixed
thunderbird80 --- wontfix
thunderbird81 --- wontfix

People

(Reporter: thomas8, Assigned: thomas8)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

+++ This bug was initially created as a clone of Bug #1664733 +++

STR:

  • edit an existing pill, press Enter

Actual

  • console error: Empty string passed to getElementById(). MsgComposeCommands.js:194:29

Small flaw in the code, I'll fix this.

The fix: less code, no error.

Attachment #9175707 - Flags: review?(alessandro)
Comment on attachment 9175707 [details] [diff] [review] 1665025_consoleErrorInputPill.diff Review of attachment 9175707 [details] [diff] [review]: ----------------------------------------------------------------- ::: mail/components/compose/content/MsgComposeCommands.js @@ +188,5 @@ > .wrappedJSObject; > > + // If no input proxy or it doesn't have an ID (in case of autocomplete > + // input of an existing pill), bail out. > + if (!input || !input.id) { This is good, thanks for the update. Let's make the comment a little bit more explicit for developers that never worked on pills. Something like: "Interrupt if we don't have an input proxy, or the input doesn't have an ID, meaning the autocomplete event was triggered within an already existing pill, therefore we don't want to create another pill."
Attachment #9175707 - Flags: review?(alessandro) → review+

(In reply to Alessandro Castellani (:aleca) from comment #3)

Review of attachment 9175707 [details] [diff] [review] ⧉[details] [diff] [review]:
This is good, thanks for the update.
Let's make the comment a little bit more explicit for developers that never
worked on pills.

Lovely! So caring! ;-)

Attachment #9175707 - Attachment is obsolete: true
Attachment #9176341 - Flags: review+

I guess we have more than enough errors in console, so one down and keeping the code in sync would qualify this for uplifting. More so as we'll certainly get lots of bugs claiming that pills don't work as expected, so having errors in this corner will be irritating for verifying such bugs. Very low risk, micro code rewrite.

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/fdbe71bbf50c
Fix console error "Empty string passed to getElementById()" when editing recipient pill. r=aleca

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED

You're too late for 80 and 81, and I think you probably meant to set flags on the attachment, not the bug.

Code cleanup, no real need to uplift.

Comment on attachment 9176341 [details] [diff] [review]
1665025_consoleErrorInputPill.diff

[Triage Comment]
As stated, this is minor code cleanup, but needed for uplifting bug 1668848.

Attachment #9176341 - Flags: approval-comm-esr78+
Keywords: regression
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: