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

CSSTUDIO-1745: hitting enter after changing a value in the color picker doesn't commit it to the property #2383

Merged
merged 1 commit into from
Sep 14, 2022

Conversation

cjenkscybercom
Copy link
Contributor

When changing a value in the color picker popover for e.g. a color widget property such as Background, the popover closes without the value changing.

This occurs because both the root node and the ok button itself are bound to these keyboard events (explicitly and implicitly), and the sanitization is triggered by leaving the field (such as clicking elsewhere, or tabbing to another field) e.g. closing the field's editor. By consuming the Enter key event explicitly, this sanitisation and editor commit/close is bypassed.

Hence, the fix being one line; to not consume the event captured by the root node and to let it propagate.

Copy link
Collaborator

@kasemir kasemir left a comment

Choose a reason for hiding this comment

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

I'm fine with doing this, but at the same time I cannot reproduce the issue.

Add Label, click background color to open color popup, click a color, then either press "Return" or click the "OK" button, either way the color is changed. How do you get it to not commit? Do you only see the issue on a specific OS?

@cjenkscybercom
Copy link
Contributor Author

I'm fine with doing this, but at the same time I cannot reproduce the issue.

Add Label, click background color to open color popup, click a color, then either press "Return" or click the "OK" button, either way the color is changed. How do you get it to not commit? Do you only see the issue on a specific OS?

I had the same problem initially, haha; it was something that was clearer to see watching somebody do it.

What the user was doing was clicking the color property to open the dialogue, clicking on either the red, green, or blue spinner, entering a value using the numpad/number-bar (not using the up/down buttons on the spinner), and then hitting enter. (without, for example, tabbing to another control, clicking elsewhere, or hitting ok) They were a very keyboard-centric user.

@kasemir
Copy link
Collaborator

kasemir commented Sep 14, 2022

entering a value using the numpad/number-bar (not using the up/down buttons on the spinner), and then hitting enter.

That does it! Looks like you're finding all kinds of issues with the color picker, it's a wonder it worked at all.

@kasemir kasemir merged commit 9a16245 into master Sep 14, 2022
@kasemir kasemir deleted the CSSTUDIO-1745 branch September 14, 2022 13:06
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.

2 participants