Closed
Bug 1705038
Opened 5 years ago
Closed 5 years ago
When dragging recipient input text, uncaught TypeError: event.originalTarget.closest is not a function
Categories
(Thunderbird :: Message Compose Window, defect)
Tracking
(thunderbird_esr78 wontfix)
RESOLVED
FIXED
89 Branch
| Tracking | Status | |
|---|---|---|
| thunderbird_esr78 | --- | wontfix |
People
(Reporter: thomas8, Assigned: thomas8)
References
Details
Attachments
(1 file)
|
2.23 KB,
patch
|
aleca
:
review+
|
Details | Diff | Splinter Review |
Starting to drag plain text from a recipient input field causes console error.
STR
- compose, type
hellointoTofield (then realize that you wanted to type that into subject) - select and drag
hellointo subject
Actual
- console error (89.0a1 (2021-04-12) (64-bit))
Uncaught TypeError: event.originalTarget.closest is not a function
connectedCallback chrome://messenger/content/mailWidgets.js:2268
mailWidgets.js:2268:47
Expected
- no console error
Analysis
closest()is only available for Element nodes, butoriginalTargetof selected input text is a text node (hence the error)originalTargetshould go away per bug 1699809- For our scenario,
targetwhen dragging selected plain text will be <html:input> (also when editing pill); need to adjust selector accordingly.
| Assignee | ||
Comment 1•5 years ago
|
||
Bug 1705038 - Fix uncaught TypeError when dragging recipient input text. r=aleca
For our dragstart target pill selector (which checks if we're dragging pills):
- Don't use originalTarget which can be a text node which does not have closest().
- Make sure that we're not dragging plain text from a pill in editing mode.
Also remove an unnecessary check for an unpredictable number of selected pills.
Attachment #9215741 -
Flags: review?(alessandro)
Comment 2•5 years ago
|
||
Comment on attachment 9215741 [details] [diff] [review]
1705038_fixRecipientInputTextDragError.diff
Review of attachment 9215741 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good, thanks.
Attachment #9215741 -
Flags: review?(alessandro) → review+
| Assignee | ||
Updated•5 years ago
|
Keywords: checkin-needed-tb
Updated•5 years ago
|
status-thunderbird_esr78:
--- → wontfix
Target Milestone: --- → 89 Branch
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/f6f294aa7802
Fix uncaught TypeError when dragging recipient input text. r=aleca
You need to log in
before you can comment on or make changes to this bug.
Description
•