Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove uploading event listeners on ChatInput unmount #4600

Merged
merged 1 commit into from
Jun 28, 2022
Merged

Conversation

MaxLeiter
Copy link
Member

@MaxLeiter MaxLeiter commented Jun 26, 2022

Not too sure how this worked in Vue 2, but we weren't removing the event listeners in Upload so you could cause an error pasting/dragging on a not-chat page.

@MaxLeiter MaxLeiter added the Type: Bug Issues that report and PRs that solve any defects that cause unexpected behaviors. label Jun 26, 2022
@MaxLeiter MaxLeiter added this to the 5.0.0 milestone Jun 26, 2022
@@ -11,12 +11,18 @@ class Uploader {
overlay: HTMLDivElement | null = null;
uploadProgressbar: HTMLSpanElement | null = null;

onDragEnter = (e: DragEvent) => this.dragEnter(e);
Copy link
Member Author

@MaxLeiter MaxLeiter Jun 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have to pass a reference as the second arg to removeEventListener for it to work properly, hence these functions.

@MaxLeiter MaxLeiter merged commit 80f65c5 into master Jun 28, 2022
@MaxLeiter MaxLeiter deleted the fixUploading branch June 28, 2022 20:31
@MaxLeiter MaxLeiter modified the milestones: 5.0.0, 4.4.0 Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issues that report and PRs that solve any defects that cause unexpected behaviors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant