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: CellExternalCopyManager plugin restores focus on paste #1011
Conversation
hmm I would say that I don't want any new console log, I assume you mainly added it for testing so please remove it. Also the 100ms seems like a lot, can't you go with a much smaller number? @6pac what do you think about this PR? |
remove console log
I've removed the console log. As for the 100ms delay, it was already there before this commit, so I can't really comment. Happy to change it though. |
On a closer look, I'm wondering whether 100ms should be replaced with
|
yeah sure if you want to add an extra config option for it, that should be ok but please update the associated TypeScript interface for it too |
The option is already in there, I would just use it for both delays (delay on paste and delay on copy). |
if it's the same kind of topic, then I guess it's ok |
- use clipboardPasteDelay option to control the timeout on paste from clipboard operation - formatting
@PierreYvesR before I merged this, can I assume that you tried it after the latest code change? |
Yes I did. I also played with the timeout delay, and it does work. I can even set it to 0 without issues. I've written a Cypress test for this (I had never used Cypress, so I was intrigued). |
you can add it if you want, just make sure that it's for For Copy+Paste, these 2 articles seems interesting, I used the |
Test: SlickCellExternalCopyManager plugin restores focus on paste
That's where I found |
- check cell value
great thanks for the contribution and new Cypress test :) Does that complete your code change? Merci :) |
Yes, but I guess I should squash it all into one commit, right?
|
no need GitHub has a "Squash and Merge" that I use most often, thanks again for the contribution. However note that since I already published a new release just couple days ago, I will probably wait a few more days to release this, maybe next weekend. Remind me if I forget, cheers |
All looks good to me :-) |
@PierreYvesR thanks for mentioning cypress-real-events. Thats a real gamechanger to test copy&paste events properly |
Thanks for the contribution, this was released in v5.9.1. |
When using doing copy-paste with CellExternalCopyManager, the grid loses focus after Ctrl-V.
The issue can be seen on example-excel-compatible-spreadsheet by playing with the arrow keys and doing some copy/paste.
The commit reuses the code found some 20 lines before in the same function to restore the focus.