Partially revert "Clean up inviteLink handling, harden compose input"

This commit is contained in:
Scott Nonnenberg 2021-05-21 11:32:10 -07:00 committed by GitHub
parent 9f9dd4cd98
commit e859fcd4b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 0 additions and 48 deletions

View file

@ -77,7 +77,6 @@ export type Props = {
onSubmit(message: string, mentions: Array<BodyRangeType>): unknown;
getQuotedMessage(): unknown;
clearQuotedMessage(): unknown;
setSecureInput(enabled: boolean): unknown;
};
const MAX_LENGTH = 64 * 1024;
@ -95,7 +94,6 @@ export const CompositionInput: React.ComponentType<Props> = props => {
skinTone,
draftText,
draftBodyRanges,
setSecureInput,
getQuotedMessage,
clearQuotedMessage,
sortedGroupMembers,
@ -252,20 +250,6 @@ export const CompositionInput: React.ComponentType<Props> = props => {
return false;
};
const onFocus = (): void => {
setSecureInput(true);
};
const onBlur = (): void => {
setSecureInput(false);
};
React.useEffect(() => {
return () => {
setSecureInput(false);
};
}, [setSecureInput]);
const onEnter = (): boolean => {
const quill = quillRef.current;
const emojiCompletion = emojiCompletionRef.current;
@ -501,8 +485,6 @@ export const CompositionInput: React.ComponentType<Props> = props => {
onChange,
onEnter,
onEscape,
onFocus,
onBlur,
onPickEmoji,
onShortKeyEnter,
onTab,
@ -517,8 +499,6 @@ export const CompositionInput: React.ComponentType<Props> = props => {
return (
<ReactQuill
className={`${BASE_CLASS_NAME}__quill`}
onFocus={() => callbacksRef.current.onFocus()}
onBlur={() => callbacksRef.current.onBlur()}
onChange={() => callbacksRef.current.onChange()}
defaultValue={delta}
modules={{