Closed
Bug 1705038
Opened 3 years ago
Closed 3 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
hello
intoTo
field (then realize that you wanted to type that into subject) - select and drag
hello
into 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, butoriginalTarget
of selected input text is a text node (hence the error)originalTarget
should go away per bug 1699809- For our scenario,
target
when dragging selected plain text will be <html:input> (also when editing pill); need to adjust selector accordingly.
Assignee | ||
Comment 1•3 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•3 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•3 years ago
|
Keywords: checkin-needed-tb
Updated•3 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
•