Closed Bug 1771526 Opened 2 years ago Closed 2 years ago

Cannot select/copy attendees in Lightning event

Categories

(Calendar :: Dialogs, defect)

Thunderbird 91
defect

Tracking

(Not tracked)

RESOLVED FIXED
103 Branch

People

(Reporter: mail, Assigned: lasana)

References

Details

Attachments

(2 files)

Attached image Peek 2022-05-27 19-52.gif —

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0

Steps to reproduce:

Open a meeting in Lightning. See the attendees list. The attendees are shown but cannot be selected or copied. I right clicked, tried click-drag to highlight text.

Expected results:

Right click on attendee name -> copy name, email address, or both.
Click + drag on text of attendee name -> ctrl+c = copy the text.

Component: Add-Ons: General → Dialogs
Product: Thunderbird → Calendar

Not an unreasonable expectation. We could add some css styles for focus but I think handling the shortcuts might affect strings which if that is the case is too late. Maybe these out to be custom elements instead of divs or perhaps we have an element already for this kind of display?

Flags: needinfo?(henry)
Flags: needinfo?(alessandro)

As a first thought, I don't think just making each item receive focus is necessary or that helpful in this context.

Click + drag on text of attendee name -> ctrl+c = copy the text.

If we want to select the text, then we just need to set user-select: text to overwrite the inherited rule from the wrapping XUL boxes https://searchfox.org/mozilla-central/rev/3419858c997f422e3e70020a46baae7f0ec6dacc/toolkit/content/minimal-xul.css#20

And I think we need the scripts "chrome://global/content/globalOverlay.js" and "chrome://global/content/editMenuOverlay.js" to enable copy and paste (I'm not 100% sure about this, it is just from memory and a brief look).

If we want mailto links like the other items, then use <a>, which would be focusable. The links above should do this as well.

Right click on attendee name -> copy name, email address, or both.

I'm not sure we really need this given that it is visible in the text, but we could have a context menu for the <a> items. This would require new strings, unless we borrow them from the message header https://searchfox.org/comm-central/rev/7923bcceab6029d38d0be76a021424b300997dbe/mail/locales/en-US/chrome/messenger/messenger.dtd#879,881

Flags: needinfo?(henry)

Like Henry wrote in the comment above.

If we want to select the text, then we just need to set user-select: text to overwrite the inherited rule from the wrapping XUL boxes https://searchfox.org/mozilla-central/rev/3419858c997f422e3e70020a46baae7f0ec6dacc/toolkit/content/minimal-xul.css#20
And I think we need the scripts "chrome://global/content/globalOverlay.js" and "chrome://global/content/editMenuOverlay.js" to enable copy and paste (I'm not 100% sure about this, it is just from memory and a brief look).

This is the easiest solution as it leverages the generic copy popup components from toolkit

Flags: needinfo?(alessandro)

globalOverlay.js and editMenuOverlay.js both appear to be in calendar-summary-dialog.xhtml right click does not seem to bring up the context menu though? Any ideas?

Flags: needinfo?(henry)
Flags: needinfo?(alessandro)
Assignee: nobody → lasana
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

Thanks for investigating this.
So, if I'm not wrong, the globalOverlay.js and editMenuOverlay.js are needed for the built-in context menu of an input field. With those, we get the standard copy, paste, select all, etc, popup menu.

For items that are not input field, we need to use a custom menu popup with some predefined items.
We'd need something like the simpleCopyPopup menuitem, but specific for the edit dialog: https://searchfox.org/comm-central/rev/9bf8c72fa3e416d59b24468fb852f69f535ee1fb/mail/base/content/mainPopupSet.inc.xhtml#64

Flags: needinfo?(alessandro)

Looking at the event dialog (not the summary one) the attendees are selectable and there is a context menu albeit with specific actions and styles. In the interest of some degree of consistency I'm going to implement this the same way. I'll have to re-use some strings from elsewhere for now because it's too late to introduce new ones.

In the near future we should convert all these html generating functions into configurable custom elements.

Flags: needinfo?(henry)
Attachment #9280336 - Attachment description: Bug 1771526: Make attendees selectable in summary dialog. r=aleca → Bug 1771526: Make attendees selectable in summary dialog, add context menu. r=aleca
Target Milestone: --- → 103 Branch

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/0d93fe4084f0
Make attendees selectable in summary dialog, add context menu. r=aleca

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Regressions: 1781931
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: