Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
Fixes the copy action.
yanasb54f92b2ae05
diff --git a/modules/UI/toolbars/Toolbar.js b/modules/UI/toolbars/Toolbar.jsindex 4980ff93ea..2214c7945b 100644--- a/modules/UI/toolbars/Toolbar.js+++ b/modules/UI/toolbars/Toolbar.js@@ -20,15 +20,24 @@ function openLinkDialog () {inviteAttributes = "value=\"" + encodeURI(roomUrl) + "\"";}+ let inviteLinkId = "inviteLinkRef";+ let focusInviteLink = function() {+ $('#' + inviteLinkId).focus();+ $('#' + inviteLinkId).select();+ };+let title = APP.translation.generateTranslationHTML("dialog.shareLink");APP.UI.messageHandler.openTwoButtonDialog(null, title, null,- '<input id="inviteLinkRef" type="text" '+ '<input id="' + inviteLinkId + '" type="text" '+ inviteAttributes + ' readonly/>',false, "dialog.copy",function (e, v) {if (v && roomUrl) {JitsiMeetJS.analytics.sendEvent('toolbar.invite.button');++ focusInviteLink();+document.execCommand('copy');}else {@@ -36,20 +45,21 @@ function openLinkDialog () {}},function (event) {- if (roomUrl) {- $('#inviteLinkRef').focus();- $('#inviteLinkRef').select();- } else {+ if (!roomUrl) {if (event && event.target) {$(event.target).find('button[value=true]').prop('disabled', true);}}+ else {+ focusInviteLink();+ }},function (e, v, m, f) {if(!v && !m && !f)JitsiMeetJS.analytics.sendEvent('toolbar.invite.close');- }+ },+ 'Copy' // Focus Copy button.);}diff --git a/modules/UI/util/MessageHandler.js b/modules/UI/util/MessageHandler.jsindex 8c9cfb31b0..12d3ef4fca 100644--- a/modules/UI/util/MessageHandler.js+++ b/modules/UI/util/MessageHandler.js@@ -108,7 +108,7 @@ var messageHandler = {persistent: false,buttons: buttons,defaultButton: defaultButton,- focus: (focus && focus >= 0) ? focus : -1,+ focus: (focus) ? focus : '',loaded: loadedFunction,submit: function (e, v, m, f) {twoButtonDialog = null;