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 for loss of data when pasting via context menu #1023

Conversation

Jeremy1026
Copy link
Contributor

No description provided.

@tzarebczan
Copy link
Contributor

Thanks @Jeremy1026 , sent you LBC on Discord for this!

@neb-b
Copy link

neb-b commented Feb 16, 2018

This doesn't fix the issue.

I don't think it's an issue with the context. It actually looks like we don't even need this event listener for the context menu to work. I just deleted it and can still paste stuff.

If I had to guess I think it's an issue with the publish component.

@@ -23,8 +23,10 @@ const { autoUpdater } = remote.require('electron-updater');
autoUpdater.logger = remote.require("electron-log");

window.addEventListener('contextmenu', event => {
Copy link

Choose a reason for hiding this comment

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

The check you added gets rid of the error that was showing up, but now it just never reaches the contextMenu() line. This entire piece can just be removed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct. In this specific regard you are correct. I didn’t want to completely remove it, just in case it serves a purpose somewhere else within the application.

Copy link

Choose a reason for hiding this comment

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

You can remove it. It currently doesn't do anything. contextMenu isn't imported into that file, which is why the error is showing up. The actual context menu is handled in a different place

@neb-b
Copy link

neb-b commented Feb 22, 2018

I've done a little more digging and it seems the issue is with react-simplemde-editor. When pasting with the mouse the handleChange is never called.

Not really sure if there is a way around it or if we will need to make a PR to that project

@Jeremy1026
Copy link
Contributor Author

I'll give that a look-see.

@btzr-io btzr-io mentioned this pull request Mar 26, 2018
@lyoshenka
Copy link
Member

closing for now. please reopen if you're ready to work on it.

@lyoshenka lyoshenka closed this Mar 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants