Merge pull request #15948 from ramonlsouza/copy-paste-workaround

fix: copy & paste does not work if whiteboard is visible
This commit is contained in:
Ramón Souza 2022-11-03 16:25:35 -03:00 committed by GitHub
commit ed24cdddde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 1 deletions

View File

@ -226,6 +226,9 @@ class MessageForm extends PureComponent {
onChange={this.handleMessageChange}
onKeyDown={this.handleMessageKeyDown}
async
onPaste={(e) => { e.stopPropagation(); }}
onCut={(e) => { e.stopPropagation(); }}
onCopy={(e) => { e.stopPropagation(); }}
/>
<Styled.SendButton
hideLabel

View File

@ -351,6 +351,9 @@ class MessageForm extends PureComponent {
value={message}
onChange={this.handleMessageChange}
onKeyDown={this.handleMessageKeyDown}
onPaste={(e) => { e.stopPropagation(); }}
onCut={(e) => { e.stopPropagation(); }}
onCopy={(e) => { e.stopPropagation(); }}
async
/>
{ENABLE_EMOJI_PICKER && this.renderEmojiButton()}

View File

@ -115,6 +115,9 @@ class ExternalVideoModal extends Component {
placeholder={intl.formatMessage(intlMessages.urlInput)}
disabled={sharing}
aria-describedby="exernal-video-note"
onPaste={(e) => { e.stopPropagation(); }}
onCut={(e) => { e.stopPropagation(); }}
onCopy={(e) => { e.stopPropagation(); }}
/>
</label>
<Styled.ExternalVideoNote id="external-video-note">

View File

@ -544,6 +544,9 @@ class Poll extends Component {
data-test="pollOptionItem"
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 && (
<Styled.DeletePollOptionButton
@ -785,7 +788,9 @@ class Poll extends Component {
data-test="pollQuestionArea"
value={customInput ? questionAndOptions : question}
onChange={(e) => this.handleTextareaChange(e)}
onPaste={() => this.setState({ isPasting: true })}
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();

View File

@ -194,6 +194,9 @@ class Polling extends Component {
placeholder={intl.formatMessage(intlMessages.responsePlaceholder)}
maxLength={MAX_INPUT_CHARS}
ref={(r) => { this.responseInput = r; }}
onPaste={(e) => { e.stopPropagation(); }}
onCut={(e) => { e.stopPropagation(); }}
onCopy={(e) => { e.stopPropagation(); }}
/>
<Styled.SubmitVoteButton
data-test="submitAnswer"