Repository navigation
Conversation
…e left-most. pgadmin-org#9130 rc-dock selects the tab to the right of a closed active tab, but falls back to the first tab when there is none, so closing the right-most tab scrolled the tab bar back to the start. Activate the right neighbour or, failing that, the left one before removing the tab, matching browsers. Closes pgadmin-org#9130
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughWhen ChangesTab Close Selection
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to
|
|
Squashed and merged as 610cad0. |
Closing the active tab selected the tab to its right, or the left-most tab when there was none, so closing the right-most tab scrolled the tab bar back to the start (rc-dock's default).
LayoutDocker.close()now activates the right neighbour or, failing that, the left one before removing the tab, matching Chrome. Closing an inactive tab leaves the selection alone, as before.Test plan
LayoutDocker.spec.js(right-most, middle, inactive and only-tab closes); the right-most case fails without the fix.DockLayoutin jsdom that the saved layout records the new active tab.Closes #9130
Summary by CodeRabbit