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

Fix RangeError on non-file drag/drop events #1498

Merged
merged 1 commit into from
Sep 22, 2017
Merged

Conversation

liliakai
Copy link
Contributor

Just noticed some spurious "RangeError: Maximum call stack size exceeded" statements in the console. Investigation reveals they can be repro'd by selecting text in a message, and then dragging the text around.

schermafbeelding 2017-09-22 om 3 09 08 pm

ConversationView responds to drag/drop events by forwarding them to its file
input. The file input stops propagation and handles the event only if the data
transfer is type file. This means that any other data type (text, img, etc...)
causes an recursive loop of event propagation, eventually resulting in logging a
"RangeError: Maximum call stack size exceeded".

Fix by only forwarding files to the file input.

// FREEBIE
@scottnonnenberg scottnonnenberg merged commit 42f2142 into master Sep 22, 2017
@scottnonnenberg scottnonnenberg deleted the drag-n-drop branch September 22, 2017 16:44
scottnonnenberg added a commit that referenced this pull request Sep 22, 2017
Fix extended periods of not receiving messages on Linux (#1497)

Fix crash on non-file drag/drop events (#1498)

Dev:
  - yarn install now builds electron dependencies automatically
    (#1491)
  - Docs are refreshed for the new world of Electron (#1491)
  - Update our release scripts to match changes in electron-builder
    (#1484)
  - Additional logging when we can't decrypt a user's profile (#1483)
  - Remove images/emoji directory (#1485)

FREEBIE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants