diff --git a/src/modules/colorPicker/ColorPickerUI/Helpers/AppStateHandler.cs b/src/modules/colorPicker/ColorPickerUI/Helpers/AppStateHandler.cs index 2b303cb663..236c4fbfb0 100644 --- a/src/modules/colorPicker/ColorPickerUI/Helpers/AppStateHandler.cs +++ b/src/modules/colorPicker/ColorPickerUI/Helpers/AppStateHandler.cs @@ -54,7 +54,7 @@ namespace ColorPicker.Helpers } } - public void EndUserSession() + public bool EndUserSession() { lock (_colorPickerVisibilityLock) { @@ -70,7 +70,11 @@ namespace ColorPicker.Helpers } SessionEventHelper.End(); + + return true; } + + return false; } } diff --git a/src/modules/colorPicker/ColorPickerUI/Keyboard/KeyboardMonitor.cs b/src/modules/colorPicker/ColorPickerUI/Keyboard/KeyboardMonitor.cs index f18f9acb02..d96b1c49c7 100644 --- a/src/modules/colorPicker/ColorPickerUI/Keyboard/KeyboardMonitor.cs +++ b/src/modules/colorPicker/ColorPickerUI/Keyboard/KeyboardMonitor.cs @@ -72,7 +72,7 @@ namespace ColorPicker.Keyboard // ESC pressed if (virtualCode == KeyInterop.VirtualKeyFromKey(Key.Escape)) { - _appStateHandler.EndUserSession(); + e.Handled = _appStateHandler.EndUserSession(); return; }