Skip to content

FIX: [Port] [UUM-154808] Fixing glitch on the Input Actions Editor window when closing popup window - #2488

Merged
josepmariapujol-unity merged 2 commits into
developfrom
input/window-close
Sep 30, 2026
Merged

josepmariapujol-unity merged 2 commits into
developfrom
input/window-close

Conversation

@josepmariapujol-unity

@josepmariapujol-unity josepmariapujol-unity commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Backport of: https://github.cds.internal.unity3d.com/unity/unity/pull/126669

The purpose of this PR is to fix the glitch on the Input Actions Editor window when closing popup with the option "Cancel" (third one from the popup button list).

Replacing the old window's custom unsaved-changes handling with EditorWindow's built-in. Some code has been deleted plus reason:

  1. CheckCanCloseAndPromptIfDirty + its OnDestroy call --> Unity prompts pre-destroy via hasUnsavedChanges
  2. ReshowEditorWindowWithUnsavedChanges --> Nothing to resurrect — the glitch itself!!
  3. wantsToQuit hook, m_IsEditorQuitting, the delayCall reset --> Quit uses the same built-in prompt
  4. (*) prefix in GetEditorTitle (lost its isDirty param) --> Unity draws its own unsaved marker; it was doubled
  5. Early-out + UpdateWindowTitle() in DirtyInputActionsEditorWindow --> Collapses to isDirty = HasContentChanged(); since the title no longer encodes dirtiness

Before:

https://github.cds.internal.unity3d.com/user-attachments/assets/8abad528-b6f8-413a-a4fd-0de33385e4d7

After:

https://github.cds.internal.unity3d.com/user-attachments/assets/afa45998-5875-434f-b528-83764dabec1b

Testing status & QA

N/A

Overall Product Risks

Please rate the potential complexity and halo effect from low to high for the reviewers. Note down potential risks to specific Editor branches if any.

  • Complexity: 0
  • Halo Effect: 0

Comments to reviewers

Please describe any additional information such as what to focus on, or historical info for the reviewers.

Checklist

Before review:

  • Changelog entry added.
    • Explains the change in Changed, Fixed, Added sections.
    • For API change contains an example snippet and/or migration example.
    • JIRA ticket linked, example (case %%). If it is a private issue, just add the case ID without a link.
    • Jira port for the next release set as "Resolved".
  • Tests added/changed, if applicable.
    • Functional tests Area_CanDoX, Area_CanDoX_EvenIfYIsTheCase, Area_WhenIDoX_AndYHappens_ThisIsTheResult.
    • Performance tests.
    • Integration tests.
  • Docs for new/changed API's.
    • Xmldoc cross references are set correctly.
    • Added explanation how the API works.
    • Usage code examples added.
    • The manual is updated, if needed.

During merge:

  • Commit message for squash-merge is prefixed with one of the list:
    • NEW: ___.
    • FIX: ___.
    • DOCS: ___.
    • CHANGE: ___.
    • RELEASE: 1.1.0-preview.3.

@josepmariapujol-unity josepmariapujol-unity self-assigned this Sep 29, 2026

@u-pr u-pr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Harness Review

Needs changes

The change moves save and discard handling to Unity’s unsaved-changes flow, but the new close-time auto-save has a reachable data-loss case.

Reviewed commit 92ff8c0

🤖 Helpful? 👍/👎

@josepmariapujol-unity josepmariapujol-unity changed the title Fix: [Port] [UUM-154808] Fixing glitch on the Input Actions Editor window when closing popup window FIX: [Port] [UUM-154808] Fixing glitch on the Input Actions Editor window when closing popup window Sep 29, 2026
@codecov-github-com

codecov-github-com Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 60.00000% with 14 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...Editor/UITKAssetEditor/InputActionsEditorWindow.cs 60.00% 14 Missing ⚠️
@@             Coverage Diff             @@
##           develop    #2488      +/-   ##
===========================================
+ Coverage    78.95%   78.96%   +0.01%     
===========================================
  Files          767      767              
  Lines       140914   140949      +35     
===========================================
+ Hits        111262   111305      +43     
+ Misses       29652    29644       -8     
Flag Coverage Δ
inputsystem_MacOS_6000.0 5.30% <0.00%> (-0.01%) ⬇️
inputsystem_MacOS_6000.0_project 77.51% <60.00%> (+0.02%) ⬆️
inputsystem_MacOS_6000.3 5.30% <0.00%> (-0.01%) ⬇️
inputsystem_MacOS_6000.3_project 77.51% <60.00%> (+0.01%) ⬆️
inputsystem_MacOS_6000.6 5.29% <0.00%> (-0.01%) ⬇️
inputsystem_MacOS_6000.6_project 77.57% <60.00%> (+0.02%) ⬆️
inputsystem_Ubuntu_6000.0 5.31% <0.00%> (-0.01%) ⬇️
inputsystem_Ubuntu_6000.0_project 77.42% <60.00%> (+0.02%) ⬆️
inputsystem_Ubuntu_6000.3 5.31% <0.00%> (-0.01%) ⬇️
inputsystem_Ubuntu_6000.3_project 77.41% <60.00%> (+0.02%) ⬆️
inputsystem_Ubuntu_6000.6 5.30% <0.00%> (-0.01%) ⬇️
inputsystem_Ubuntu_6000.6_project 77.47% <60.00%> (+0.02%) ⬆️
inputsystem_Windows_6000.0 5.30% <0.00%> (-0.01%) ⬇️
inputsystem_Windows_6000.0_project 77.63% <60.00%> (+0.01%) ⬆️
inputsystem_Windows_6000.3 5.30% <0.00%> (-0.01%) ⬇️
inputsystem_Windows_6000.3_project 77.63% <60.00%> (+0.02%) ⬆️
inputsystem_Windows_6000.6 5.29% <0.00%> (-0.01%) ⬇️
inputsystem_Windows_6000.6_project 77.69% <60.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...Editor/UITKAssetEditor/InputActionsEditorWindow.cs 53.22% <60.00%> (+0.60%) ⬆️

... and 3 files with indirect coverage changes

ℹ️ Need help interpreting these results?

@Pauliusd01
Pauliusd01 requested review from K-Tone and removed request for UnityAnthony September 30, 2026 04:25
@josepmariapujol-unity
josepmariapujol-unity merged commit 2094afc into develop Sep 30, 2026
68 of 72 checks passed
@josepmariapujol-unity
josepmariapujol-unity deleted the input/window-close branch September 30, 2026 06:45
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