From 4246b5bf19f1a62345fdabbebbf65e4f87bcc6dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ram=C3=B3n=20Souza?= Date: Thu, 3 Nov 2022 13:06:25 -0300 Subject: [PATCH 1/2] copy-paste whiteboard fix --- .../ui/components/breakout-room/message-form/component.jsx | 1 + .../imports/ui/components/chat/message-form/component.jsx | 1 + .../ui/components/external-video-player/modal/component.jsx | 1 + bigbluebutton-html5/imports/ui/components/poll/component.jsx | 3 ++- .../imports/ui/components/polling/component.jsx | 1 + 5 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bigbluebutton-html5/imports/ui/components/breakout-room/message-form/component.jsx b/bigbluebutton-html5/imports/ui/components/breakout-room/message-form/component.jsx index 5dcb6997cc..c9b4bf9dd3 100755 --- a/bigbluebutton-html5/imports/ui/components/breakout-room/message-form/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/breakout-room/message-form/component.jsx @@ -226,6 +226,7 @@ class MessageForm extends PureComponent { onChange={this.handleMessageChange} onKeyDown={this.handleMessageKeyDown} async + onPaste={(e) => { e.stopPropagation(); }} /> { e.stopPropagation(); }} async /> {ENABLE_EMOJI_PICKER && this.renderEmojiButton()} diff --git a/bigbluebutton-html5/imports/ui/components/external-video-player/modal/component.jsx b/bigbluebutton-html5/imports/ui/components/external-video-player/modal/component.jsx index 5401cc72d1..d7cc3b95ce 100644 --- a/bigbluebutton-html5/imports/ui/components/external-video-player/modal/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/external-video-player/modal/component.jsx @@ -115,6 +115,7 @@ class ExternalVideoModal extends Component { placeholder={intl.formatMessage(intlMessages.urlInput)} disabled={sharing} aria-describedby="exernal-video-note" + onPaste={(e) => { e.stopPropagation(); }} /> diff --git a/bigbluebutton-html5/imports/ui/components/poll/component.jsx b/bigbluebutton-html5/imports/ui/components/poll/component.jsx index df16491719..4c428c49e5 100644 --- a/bigbluebutton-html5/imports/ui/components/poll/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/poll/component.jsx @@ -544,6 +544,7 @@ class Poll extends Component { data-test="pollOptionItem" onChange={(e) => this.handleInputChange(e, i)} maxLength={MAX_INPUT_CHARS} + onPaste={(e) => { e.stopPropagation(); }} /> {optList.length > MIN_OPTIONS_LENGTH && ( this.handleTextareaChange(e)} - onPaste={() => this.setState({ isPasting: true })} + onPaste={(e) => { e.stopPropagation(); this.setState({ isPasting: true }); }} onKeyPress={(event) => { if (event.key === 'Enter' && customInput) { this.handlePollLetterOptions(); diff --git a/bigbluebutton-html5/imports/ui/components/polling/component.jsx b/bigbluebutton-html5/imports/ui/components/polling/component.jsx index d320b5efd2..64660f5e54 100644 --- a/bigbluebutton-html5/imports/ui/components/polling/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/polling/component.jsx @@ -194,6 +194,7 @@ class Polling extends Component { placeholder={intl.formatMessage(intlMessages.responsePlaceholder)} maxLength={MAX_INPUT_CHARS} ref={(r) => { this.responseInput = r; }} + onPaste={(e) => { e.stopPropagation(); }} /> Date: Thu, 3 Nov 2022 16:24:00 -0300 Subject: [PATCH 2/2] add copy and cut events --- .../ui/components/breakout-room/message-form/component.jsx | 2 ++ .../imports/ui/components/chat/message-form/component.jsx | 2 ++ .../ui/components/external-video-player/modal/component.jsx | 2 ++ bigbluebutton-html5/imports/ui/components/poll/component.jsx | 4 ++++ .../imports/ui/components/polling/component.jsx | 2 ++ 5 files changed, 12 insertions(+) diff --git a/bigbluebutton-html5/imports/ui/components/breakout-room/message-form/component.jsx b/bigbluebutton-html5/imports/ui/components/breakout-room/message-form/component.jsx index c9b4bf9dd3..f1afb1f905 100755 --- a/bigbluebutton-html5/imports/ui/components/breakout-room/message-form/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/breakout-room/message-form/component.jsx @@ -227,6 +227,8 @@ class MessageForm extends PureComponent { onKeyDown={this.handleMessageKeyDown} async onPaste={(e) => { e.stopPropagation(); }} + onCut={(e) => { e.stopPropagation(); }} + onCopy={(e) => { e.stopPropagation(); }} /> { e.stopPropagation(); }} + onCut={(e) => { e.stopPropagation(); }} + onCopy={(e) => { e.stopPropagation(); }} async /> {ENABLE_EMOJI_PICKER && this.renderEmojiButton()} diff --git a/bigbluebutton-html5/imports/ui/components/external-video-player/modal/component.jsx b/bigbluebutton-html5/imports/ui/components/external-video-player/modal/component.jsx index d7cc3b95ce..23ca5db5f8 100644 --- a/bigbluebutton-html5/imports/ui/components/external-video-player/modal/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/external-video-player/modal/component.jsx @@ -116,6 +116,8 @@ class ExternalVideoModal extends Component { disabled={sharing} aria-describedby="exernal-video-note" onPaste={(e) => { e.stopPropagation(); }} + onCut={(e) => { e.stopPropagation(); }} + onCopy={(e) => { e.stopPropagation(); }} /> diff --git a/bigbluebutton-html5/imports/ui/components/poll/component.jsx b/bigbluebutton-html5/imports/ui/components/poll/component.jsx index 4c428c49e5..83cc4ce441 100644 --- a/bigbluebutton-html5/imports/ui/components/poll/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/poll/component.jsx @@ -545,6 +545,8 @@ class Poll extends Component { onChange={(e) => this.handleInputChange(e, i)} maxLength={MAX_INPUT_CHARS} onPaste={(e) => { e.stopPropagation(); }} + onCut={(e) => { e.stopPropagation(); }} + onCopy={(e) => { e.stopPropagation(); }} /> {optList.length > MIN_OPTIONS_LENGTH && ( this.handleTextareaChange(e)} onPaste={(e) => { e.stopPropagation(); this.setState({ isPasting: true }); }} + onCut={(e) => { e.stopPropagation(); }} + onCopy={(e) => { e.stopPropagation(); }} onKeyPress={(event) => { if (event.key === 'Enter' && customInput) { this.handlePollLetterOptions(); diff --git a/bigbluebutton-html5/imports/ui/components/polling/component.jsx b/bigbluebutton-html5/imports/ui/components/polling/component.jsx index 64660f5e54..ca71f614af 100644 --- a/bigbluebutton-html5/imports/ui/components/polling/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/polling/component.jsx @@ -195,6 +195,8 @@ class Polling extends Component { maxLength={MAX_INPUT_CHARS} ref={(r) => { this.responseInput = r; }} onPaste={(e) => { e.stopPropagation(); }} + onCut={(e) => { e.stopPropagation(); }} + onCopy={(e) => { e.stopPropagation(); }} />