Page MenuHomePhorge

D15062.1765037493.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D15062.1765037493.diff

diff --git a/landing/subscription-form.react.js b/landing/subscription-form.react.js
--- a/landing/subscription-form.react.js
+++ b/landing/subscription-form.react.js
@@ -21,7 +21,7 @@
React.useState<SubscriptionFormStatus>({ status: 'pending' });
const onEmailSubmitted = React.useCallback(
- async (e: Event) => {
+ async (e: SyntheticEvent<HTMLButtonElement>) => {
e.preventDefault();
if (
diff --git a/web/chat/chat-input-bar.react.js b/web/chat/chat-input-bar.react.js
--- a/web/chat/chat-input-bar.react.js
+++ b/web/chat/chat-input-bar.react.js
@@ -460,13 +460,18 @@
Escape: close,
};
- if (
- this.props.inputState.typeaheadState.canBeVisible &&
- actions[event.key]
- ) {
+ const eventKey = event.key;
+
+ if (!Object.keys(actions).includes(eventKey)) {
+ return;
+ }
+
+ const action = actions[eventKey];
+
+ if (this.props.inputState.typeaheadState.canBeVisible && action) {
event.preventDefault();
- actions[event.key]();
- } else if (event.key === 'Enter' && !event.shiftKey) {
+ action();
+ } else if (eventKey === 'Enter' && !event.shiftKey) {
event.preventDefault();
this.send();
}
diff --git a/web/sidebar/community-picker.react.js b/web/sidebar/community-picker.react.js
--- a/web/sidebar/community-picker.react.js
+++ b/web/sidebar/community-picker.react.js
@@ -25,7 +25,7 @@
const modalContext = useModalContext();
const openAccountSettings = React.useCallback(
- (event: SyntheticEvent<HTMLButtonElement>) => {
+ (event: SyntheticEvent<HTMLAnchorElement | HTMLDivElement>) => {
event.preventDefault();
dispatch({
type: updateNavInfoActionType,

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 6, 4:11 PM (17 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5839400
Default Alt Text
D15062.1765037493.diff (1 KB)

Event Timeline