Open Bug 1751897 Opened 3 years ago Updated 2 years ago

compose action popups should not auto-close if the UI is locked

Categories

(Thunderbird :: Add-Ons: Extensions API, enhancement)

enhancement

Tracking

(Not tracked)

People

(Reporter: TbSync, Unassigned)

References

(Blocks 1 open bug)

Details

In the onBeforeSend event listener, a composeAction popup can be opened to request data from the user. If the user clicks outside of the popup, it gets closed.

If the add-on developer did not think of this case and has not added logic to send the unload event to the onBeforeSend listener via runtime messaging, the user gets stuck (mail does not send, window is locked), because the onBeforeSend event is still waiting for input.

I believe this could cause bad UX and the API should make sure this does not happen.

I do not know if this is possible, but what do you think about this, Geoff?

Flags: needinfo?(geoff)

It's unlikely to be pretty, pop-ups act basically the same way as context menus do. It might be possible to reject the popuphiding event, I'm not sure. Maybe have a look into how the devtools "disable pop-up auto hide" feature works.

Flags: needinfo?(geoff)

I take that as a "Yes, we should prevent popups from auto-closing in a locked composer, if you can get it working nicely"

It seems reasonable, yes. Sorry, I misunderstood the question.

(In reply to John Bieling (:TbSync) from comment #0)

If the add-on developer did not think of this case and has not added logic to send the unload event to the onBeforeSend listener via runtime messaging, the user gets stuck (mail does not send, window is locked), because the onBeforeSend event is still waiting for input.

For reference, it is not possible to call runtime.sendMessage() from an unload event, which is another reason this is needed. See bug 1534041.

You need to log in before you can comment on or make changes to this bug.