Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

composeView.setToRecipients Adding Non-Argument Recipients

22 views
Skip to first unread message

Christian Gower

unread,
Aug 15, 2022, 5:06:42 AM8/15/22
to InboxSDK
We're building an app that pulls a list of matching contacts from a 3rd party when a user is typing in the To recipient field. This list is inserted into to the DOM via a new parent element; this list is not inserted into the native div[role="listbox"] element that holds the matching contacts returned by Gmail.

If the user clicks one of the 3rd party contacts we trigger the composeView.setToRecipients function to update the To recipients via the Array argument for this function. This behaviour works as expected as long as there are no matching contacts returned by Gmail in the native div[role="listbox"] element. If there are matching contacts returned by Gmail in the native div[role="listbox"] element then setToRecipients will include either the most recently hovered-over of these contacts, or the first contact on this list of contacts rather than only using the Array argument.

Does anyone have advice on how to ensure that setToRecipients only ever uses the email addresses that are supplied via the function's Array argument?
Reply all
Reply to author
Forward
0 new messages