Add support for drawAttention to windows API and messageDisplay.open
Categories
(Thunderbird :: Add-Ons: Extensions API, enhancement)
Tracking
(Not tracked)
People
(Reporter: john, Unassigned)
Details
| Reporter | ||
Comment 1•3 years ago
|
||
The request originates here.
I have not yet found how the mid: url opened from the console is setting the attention, which I think starts its code path here:
https://searchfox.org/comm-central/rev/1ca70dd767b60ad80bbd4f1cd551d1e4963abbb8/mail/components/MessengerContentHandler.jsm#523
The Firefox windows.update() method linked in comment #0 states, that a focused window may not get attention, but after we opened the message, it is already focused. Hm.
| Reporter | ||
Comment 2•3 years ago
|
||
Uups, we already support drawAttention:
https://webextension-api.thunderbird.net/en/stable/windows.html#update-windowid-updateinfo
@max: Could you check if that can be used to get the attention working for your own protocol_handler calls from the command line?
I confirm that drawAttention parameter of windows.update, when called from protocol_handler page, results in the effect that I expected.
| Reporter | ||
Comment 4•3 years ago
|
||
I confirm that drawAttention parameter of windows.update, when called from protocol_handler page, results in the effect that I expected.
That sounds great.
However, I have not understood what you are tying to do in https://bugzilla.mozilla.org/show_bug.cgi?id=1757142#c24 (please do not post in the closed bug, but here). Why do you want to close a tab? What is the remaining issue?
John, the issue risen in the bug #1757142 comment 24 has nothing common with drawAttention and current title of this issue is irrelevant to specific aspects of protocol_handlers behavior. If you strongly against adding anything to the bug #1757142 then we may:
- change title of this issue since anyway it does not require any action,
- close this issue and create a new one.
I tried to implement a kind of mail.openMessageBehavior preference for protocol handler, see the bug #1757142 comment 18 and faced some problems. Perhaps I should strip code related to drawAttention from the example I used to explore the new feature.
| Reporter | ||
Comment 6•3 years ago
|
||
Now I get it.
I close this bug as WORKSFORME. Please create a new bug about having a default preference for protocol_handler pages being opened in tabs or windows. We will most certainly not use the same preferences which is used for messages.
Description
•