Idea

sharmilan-a avatar image
sharmilan-a Posted ·

Embeddable widget mostly not loaded the telephone number, when clicking the CRM contact tp number

When click on the phone number anywhere on the website should load the tp number in the widget. But it works for some time and often not working, then need a refresh to make workable
topic-default
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Embbnux Ji avatar image
Embbnux Ji Posted ·
Hi, Sharmilan Do we mean 'Dial API' fail to work?  https://github.com/ringcentral/ringcentral-embeddable/blob/master/docs/control-widget.md#go-to-dial-...  The widget will prevent duplicate call from dial api.
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

sharmilan-a avatar image
sharmilan-a Posted ·
Hi Embbunx Ji,
Yes, I am have using click href event for tp numbers, it works fine but some time not gives any response.
I got it from  https://github.com/ringcentral/ringcentral-embeddable/blob/master/src/lib/Adapter/index.js#L55

happening mac high sierra chrome.
7 comments
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Hi, Sharmilan Can you provide more details to reproduce no response issue. For 'a[href^="tel:"] default event listener, it will fail to work if 'a[href^="tel:"]'  tag created after event listener created.
0 Likes 0 · ·
Hi, Embbunx Ji,
I didn't fully check your code base, it is not handled within the widget, how can be used in the Single page application. I can add functionality as follows but feels bit painful.

const phoneCallTags = window.document.querySelectorAll('a[href^="tel:"]');
for (let i = 0; i < phoneCallTags.length; ++i) {
const phoneTag = phoneCallTags[i];
phoneTag.addEventListener('click', () => {
  window.RCAdapter.setMinimized(false)
  const hrefStr = phoneTag.getAttribute('href');
  const phoneNumber = hrefStr.replace(/[^\d+*-]/g, '');
  
  document.querySelector("#rc-widget-adapter-frame").contentWindow.postMessage({
      type: 'rc-adapter-new-call',
      phoneNumber,
      toCall: true
  }, '*');
}); }
0 Likes 0 · ·
Hi, Sharmilan, we will update widget adapter js codes to listen for DOM update and rebuild click listener.  https://github.com/ringcentral/ringcentral-embeddable/issues/172
1 Like 1 · ·
thanks
0 Likes 0 · ·
Hi, Sharmilan, we have updated listener codes. Would you have a try and provide feedback.
Thanks so much.
0 Likes 0 · ·
Show more comments

Write a Comment

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Your Opinion Counts

Share your great idea, or help out by voting for other people's ideas.