Deleting pills with BACKSPACE (aka DELETE, ←) key sometimes fails on MAC, depending on prior focus
Categories
(Thunderbird :: Message Compose Window, defect, P1)
Tracking
(thunderbird78? fixed)
People
(Reporter: wsmwk, Assigned: aleca)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file, 2 obsolete files)
1.57 KB,
patch
|
thomas8
:
review+
aleca
:
feedback+
wsmwk
:
approval-comm-beta+
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #1602431 +++
78 beta. Mac. I don't often delete pills so I don't know when this changed, assuming it ever worked.
"fail" Reply to a message with two addresses. Click on a pill (either one), hit delete, nothing. And nothing in error console.
"works" Reply to a message with two addresses. Click after last pill, hit delete, last pill is selected, hit delete again, pill is deleted
"works" Reply to a message with two addresses. Click after last pill, click any pill, hit delete, pill is deleted
I don't have add-ons installed that would affect compose.
Reporter | ||
Comment 1•5 years ago
|
||
(I cleaned up the description - there are only three lines of fail + works)
Also, I had situations where pill is selected by click but caret is elsewhere, like subject such that delete key results in deleting characters in subject
Assignee | ||
Comment 2•5 years ago
|
||
This is definitely a regression that happened recently.
I'll investigate and create a patch for it.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 3•5 years ago
|
||
This doesn't seem to happen on Linux or Windows, but only on macOS.
Thomas, can you confirm that on Windows everything works as expected.
Comment 4•5 years ago
•
|
||
(In reply to Wayne Mery (:wsmwk) from comment #0)
78 beta. Mac.
"fail" Reply to a message with two addresses. Click on a pill (either one), hit delete, nothing. And nothing in error console.
- Which recipient types are recipients in original message being replied to?
- Are you using Reply-all? (otherwise how did you get two pills in the reply?)
- Are you using MAC key
Delete ⌦
or the MAC equivalent of Windows Backspace←
(confusingly traditionally called Delete on MAC) - Signatures, signature settings?
- Where is cursor/focus before clicking on pills in "fail" case? (Might involve focus/controller issues given "works" cases).
(In reply to Alessandro Castellani (:aleca) from comment #3)
This doesn't seem to happen on Linux or Windows, but only on macOS.
Thomas, can you confirm that on Windows everything works as expected.
Deletion works perfectly well on Win10-64, I've just downloaded Beta 78.0b1 (32-bit) to test (does 32 vs. 64 bit matter for this?). However, STR may not be detailed enough to reproduce.
Alex, can you reproduce this bug on MAC? (Not explicitly clear from comment 3)
Assignee | ||
Comment 6•5 years ago
|
||
I found the problem and I was able to consistently recreate the issue.
The issue presents itself when the addressing row has the focus and then a pill is selected.
The focus remains on the addressing row, therefore making the delete useless as the focus needs to move to the pill first.
This method is the culprit and I think I found the bug that regressed it.
https://searchfox.org/comm-central/rev/361d3ff8a878f3ea9d7dbac0f1dce07dffc7d0ed/mail/base/content/mailWidgets.js#2489
This is a macOS issue only.
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 7•5 years ago
|
||
Found the regression by reapplying this revision: https://hg.mozilla.org/comm-central/rev/06b4fa036ccda170128e73093c437e9d545a9ba7
Apparently, the focus on macOS doesn't change naturally when clicking on a pill element, that's why I added that forced pill.focus()
.
It was correctly removed by Thomas because the blur()
interfered with the common retention of focus when CTRL+Click on a pill to unselect it.
Assignee | ||
Comment 8•5 years ago
|
||
This fixes the issue.
I'm asking a review to Richard as he can build on macOS.
Thomas, can you confirm this change doesn't affect the work done on the focus ring on Windows?
Assignee | ||
Updated•5 years ago
|
Comment 9•5 years ago
•
|
||
(In reply to Alessandro Castellani (:aleca) from comment #8)
Thomas, can you confirm this change doesn't affect the work done on the focus ring on Windows?
I don't know how this relates to focus ring, but it does not negatively impact focus upon click or pressing space bar. However, assuming that MAC allows for equivalent of Ctrl+Click, or spacebar to remove focused pill from selected pills, focus must always end up on that pill for this method even when it is no longer selected. So I think you can just do pill.focus always (without wrapping in condition). Regardless, it might trigger all sorts of command updating in compose window, not sure if triggered by just using focus() or actual focus change.
(--> Matrix?)
Comment 10•5 years ago
|
||
And can you please file another bug for MAC that focus must follow mouse clicks without extra code?
Assignee | ||
Comment 11•5 years ago
|
||
Patch updated to remove the unnecessary condition.
Also, comment and commit message have been updated.
Comment 12•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 13•5 years ago
|
||
Comment 14•5 years ago
|
||
Just give me some minutes to double-check on something.
Sorry, due to Bug 1643340 I lost some time before being able to get back to this.
Comment 15•5 years ago
|
||
I suggest some minor modifications/corrections to commit message, function comment, and inline comment. Code is unchanged, so :paenglab's r+ still stands.
As a matter of fact, we are only fixing focus for the click event, due to MAC-only bug 1645916.
We're not fixing anything for the keypress event, for which the pill is already focused (otherwise it couldn't receive the keypress). That we're also (needlessly) re-focusing the pill after keypress is just a side effect of trying to keep our code simple.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 16•5 years ago
|
||
Comment 17•5 years ago
|
||
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/d667aaed4e09
[macOS] Force focus when a click event is registered on a recipient pill. Workaround for bug 1645916. r=Paenglab
Updated•5 years ago
|
Reporter | ||
Comment 18•5 years ago
|
||
Comment 19•5 years ago
|
||
bugherder uplift |
Thunderbird 78.0b3:
https://hg.mozilla.org/releases/comm-beta/rev/e431355d0d28
Updated•5 years ago
|
Description
•