Repository navigation
Sheet tabs: right-clicking a tab activates its sheet - #1223
Merged
Merged
Conversation
As in Excel, a right-click on an inactive tab now activates that sheet, so the tab menu's Protect/Unprotect Sheet and Select All Sheets act on the sheet that was clicked rather than the one that was active. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A2bJ3LxrZ6YnmppgrfwHwr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Right-clicking a sheet tab opens the tab menu but leaves the previously active sheet active. Excel activates the tab you right-click. This matters because some menu items act on the active sheet, not the clicked one:
Insert Sheet, Delete, Rename, Move or Copy, Duplicate, Tab Color and Hide already take the clicked tab's index, so they were fine.
Repro (0.6.1 and main 84acf62)
Change
crates/ui-egui/src/tabs.rs,sheet_tabs: a secondary click on an inactive tab activates its sheet (through the existingactivate_sheet, so an open edit is committed first and point mode keeps working), before the menu reads the active sheet.Tests
right_clicking_a_tab_activates_its_sheet_so_the_menu_acts_on_itincrates/ui-egui/tests/sheet_tabs.rs: right-clicks an inactive protected tab and checks it becomes active and the menu offers "Unprotect Sheet…". It fails on main and passes here.cargo xtask ci: fmt, clippy, test, assets, layers and wasm pass.parityfails the same way on unmodified main on Windows (line endings in the regenerated checklist).Found while testing #1222 (padlock on protected tabs).