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

text added via menu (e.g. Edit->Paste or special character menu) does not appear until next key press #8

Open
okaybenji opened this issue Aug 21, 2015 · 3 comments

Comments

@okaybenji
Copy link
Collaborator

No description provided.

@wschmrdr
Copy link

wschmrdr commented Jun 3, 2016

I was also able to re-create this issue on the Linux side using highlight/middle for copy/paste, at least in the demo implementation. Assuming you are using this for quick chat on CasinoRPG, the highlight/middle for copy/paste does not work at all; I was able to get the other clipboard working. Mint 13 LTS, most recent version of Firefox. I am awaiting Mint 18 to upgrade because of a preference for LTS; I will accept if it works properly in more recent versions.

@wschmrdr
Copy link

OK, I think I have this one figured out. Looks like the self._hiddenInput.value (HIvalue) is getting updated on completion of the "paste" event. However, because self._value (Svalue) is what is being displayed to the user and isn't getting updated, you don't see what was pasted until the next keyup, when HIvalue is being added to with previous contents still there, and then Svalue is set equal to the HIvalue. Because since HIvalue isn't updated until after the paste event, I had to wrap the assignment of Svalue and re-render in a setTimeout with a delay of 1. I just copied the same code as the keyup, since it's the same functionality.

I'm going to put together a PR for this; be aware that I did not do any sort of custom functions for the paste. If necessary, that can be done.

@wschmrdr
Copy link

#38

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

No branches or pull requests

2 participants