Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32158234
D15062.1765037493.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D15062.1765037493.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D15062: [Flow262][skip-ci] SyntheticEvent fixes
Attached
Detach File
Event Timeline
Log In to Comment