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

Fixing issues when color picker freezes #8376

Merged
merged 2 commits into from
Dec 5, 2020

Conversation

martinchrzan
Copy link
Contributor

@martinchrzan martinchrzan commented Dec 3, 2020

Summary of the Pull Request

Color picker can freeze when you pick a color because we are trying to access clipboard using Clipboard.SetText - but this method might as some other applications can hold clipboard.
Switching to use Clipboard.SetDataObject I couldn't reproduce this issue anymore

This also fixes another issue when user holds activations keys while picking - this was causing that show picker was called many times and in the end it resulted in a nasty bug where we called copy into clipboard and into the editor nonstop. Can be seen here - https://youtu.be/6mzs90-KlMg?t=195
Described also here #6594

PR Checklist

  • Applies to Color Picker hangs while holding activation keystroke #6594
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Requires documentation to be updated
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Info on Pull Request

Validation Steps Performed

Unless you use some special tools for clipboard, it is hard to reproduce as it can happen randomly, but to get a stable reproduction, install Clipjump tool with this running this issue is reproducible all the time and it basically simulate the same issue that can happen randomly with some other application. With the fix, this issue does not appear anymore.

The other issue can be easily reproduced by holding activation keys while picking a color.

@martinchrzan martinchrzan added Issue-Bug Something isn't working Product-Color Picker All things around the Color Picker utility labels Dec 3, 2020
…igger show color picker numberous times and it would cause some events to be attached multiple times
@martinchrzan martinchrzan changed the title Fixing issue when color picker freezes because of locked clipboard Fixing issues when color picker freezes Dec 3, 2020
Copy link

@mnower mnower left a comment

Choose a reason for hiding this comment

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

crutkas: removed

@martinchrzan martinchrzan merged commit 3759536 into master Dec 5, 2020
@martinchrzan martinchrzan deleted the user/martinchrzan/FixPickerFreeze branch December 5, 2020 13:26
@martinchrzan martinchrzan restored the user/martinchrzan/FixPickerFreeze branch December 8, 2020 11:03
@martinchrzan martinchrzan deleted the user/martinchrzan/FixPickerFreeze branch December 8, 2020 13:08
Copy link

@mnower mnower left a comment

Choose a reason for hiding this comment

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

crutkas: removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug Something isn't working Product-Color Picker All things around the Color Picker utility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants