From 1889850f2f7f1c0cbea4f9bf278fd752ed1698ff Mon Sep 17 00:00:00 2001 From: Graham Huws Date: Thu, 18 Jan 2024 14:11:54 +0000 Subject: [PATCH] Fix selection highlight lingering after clicking save button (ISX-1482). --- Packages/com.unity.inputsystem/CHANGELOG.md | 7 +++---- .../Editor/UITKAssetEditor/Views/InputActionsEditorView.cs | 5 +++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index 272116b5bb..5188e69757 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -18,6 +18,8 @@ however, it has to be formatted properly to pass verification tests. - [`InputAction.activeValueType`](xref:UnityEngine.InputSystem.InputAction.activeValueType) returns the `Type` expected by `ReadValue` based on the currently active control that is driving the action. - [`InputAction.GetMagnitude`](xref:UnityEngine.InputSystem.InputAction.GetMagnitude) returns the current amount of actuation of the control that is driving the action. - [`InputAction.WasCompletedThisFrame`](xref:UnityEngine.InputSystem.InputAction.WasCompletedThisFrame) returns `true` on the frame that the action stopped being in the performed phase. This allows for similar functionality to [`WasPressedThisFrame`](xref:UnityEngine.InputSystem.InputAction.WasPressedThisFrame)/[`WasReleasedThisFrame`](xref:UnityEngine.InputSystem.InputAction.WasReleasedThisFrame) when paired with [`WasPerformedThisFrame`](xref:UnityEngine.InputSystem.InputAction.WasPerformedThisFrame) except it is directly based on the interactions driving the action. For example, you can use it to distinguish between the button being released or whether it was released after being held for long enough to perform when using the Hold interaction. +- Added Copy, Paste and Cut support for Action Maps, Actions and Bindings via context menu and key command shortcuts. +- Added Dual Sense Edge controller to be mapped to the same layout as the Dual Sense controller ### Fixed - Fixed syntax of code examples in API documentation for [`AxisComposite`](xref:UnityEngine.InputSystem.Composites.AxisComposite). @@ -30,10 +32,7 @@ however, it has to be formatted properly to pass verification tests. - Fixed possible exceptions thrown when deleting and adding Action Maps. - Fixed potential race condition on access to GCHandle in DefferedResolutionOfBindings and halved number of calls to GCHandle resolution [ISXB-726](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-726) - Fixed issue where composite part dropdown manipulates binding path and leaves composite part field unchanged. - -### Added -- Added Copy, Paste and Cut support for Action Maps, Actions and Bindings via context menu and key command shortcuts. -- Added Dual Sense Edge controller to be mapped to the same layout as the Dual Sense controller +- Fixed lingering highlight effect on Save Asset button after clicking. ## [1.8.0-pre.2] - 2023-11-09 diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/InputActionsEditorView.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/InputActionsEditorView.cs index bd2eca2915..b6fa07dc77 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/InputActionsEditorView.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/InputActionsEditorView.cs @@ -84,6 +84,11 @@ private void OnReset() private void OnSaveButton() { Dispatch(Commands.SaveAsset(postSaveAction)); + + // Don't let focus linger after clicking (ISX-1482). Ideally this would be only applied on mouse click, + // rather than if the user is using tab to navigate UI, but there doesn't seem to be a way to differentiate + // between those interactions at the moment. + m_Root.Q(name: saveButtonId).Blur(); } private void OnAutoSaveToggle(ChangeEvent evt)