Fixes #3695 - Add event handlers for Accept in ColorPicker text fields #3711
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes
ColorPicker
should apply changes onAccept
as well asOnHasFocusChanged
#3695Proposed Changes/Todos
Make Accept (default key Enter) in text boxes update color selection similarly to focus change events.
@tig I have removed the .NewValue if check as I'm not sure what it means on a focus changing event. Presumably the new value is supposed to indicate whether it is entering or leaving? either way the behaviour seems correct regardless.
I've also removed the
-=
event handler removals. The reason is because we are now using anonymous delegate(s,_)=>
for both Accept and FocusChange.I don't think they are needed anyway as the lifecycle of the view at that point is where they are Disposed anyway so no events should get raised and they will go out of scope and get cleaned up anyway.
Pull Request checklist:
CTRL-K-D
to automatically reformat your files before committing.dotnet test
before commit///
style comments)