[de-xbl] convert the tabmail-close-tab-button binding
Categories
(Thunderbird :: Mail Window Front End, task)
Tracking
(Not tracked)
People
(Reporter: mkmelin, Assigned: aleca)
References
Details
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
mkmelin
:
review+
|
Details | Diff | Splinter Review |
Convert the tabmail-close-tab-button binding, which extends toolbarbutton.
Might also be worth looking at what firefox dis for their button.
Assignee | ||
Comment 1•6 years ago
|
||
If I got it right, Firefox is using this method to deal with tabs and windows: https://searchfox.org/mozilla-central/source/browser/base/content/browser.js#2562
We have a similar method here: https://searchfox.org/comm-central/source/mail/base/content/mail3PaneWindowCommands.js#1107
I tried to leverage it but it doesn't work as expected, closing random tabs, or not responding at all.
I created a new method converting the XBL method to keep those conditions.
Assignee | ||
Comment 2•6 years ago
|
||
Reporter | ||
Comment 3•6 years ago
|
||
Assignee | ||
Comment 4•6 years ago
|
||
If I'm not wrong, FF uses only an image because it catches clicks with an XBL handler: https://searchfox.org/mozilla-central/rev/662de518b1686c4769320d6b8825ce4864c4eda0/browser/base/content/tabbrowser.xml#2396
Do we want to emulate the same behaviour?
Or maybe we could use the occasion to de-xbl the entire tab?
Reporter | ||
Comment 5•6 years ago
|
||
de-xbl of the whole tab should probably wait for de-xbl of tab.
I think you could just add an oncommand="closeTab(event);" on the image?
Assignee | ||
Comment 6•6 years ago
|
||
Sounds good.
The oncommand
attribute doesn't work since it's not a button.
Using onclick
works.
Reporter | ||
Comment 7•6 years ago
|
||
Assignee | ||
Comment 8•6 years ago
|
||
Reporter | ||
Comment 9•6 years ago
|
||
Comment 10•6 years ago
|
||
Yes, when you set mail.tabs.closeButtons
to 3
.
Reporter | ||
Comment 11•6 years ago
|
||
Thx RIchard! Doesn't seem Firefox has that anymore, and would seem pretty non-useful, so we could remove it. For another bug though.
Comment 12•6 years ago
|
||
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/13000cbf0633
[de-xbl] convert tabmail-close-tab-button. r=mkmelin
Updated•6 years ago
|
Description
•