Restore Alt+drag rectangular selection in the editor (#9864, #10029)#10043
Restore Alt+drag rectangular selection in the editor (#9864, #10029)#10043dpage wants to merge 1 commit into
Conversation
|
Warning Review limit reached
More reviews will be available in 7 minutes and 18 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThe pull request fixes rectangular text selection behavior in the CodeMirror code editor by removing the Changesv9.16 Release Notes and Rectangular Selection Fix
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
39709bf to
c5fe8e8
Compare
…pgadmin-org#10029 The fix for pgadmin-org#9570 (stop Alt+F5 showing a crosshair cursor) changed the rectangular-selection eventFilter to require Alt+Ctrl and moved the crosshair cue to Control. That broke the long-standing Alt+drag block (column) selection and left an inconsistent Ctrl crosshair cue. Restore the default rectangularSelection() (Alt+drag) and drop crosshairCursor entirely - the crosshair-on-Alt was exactly the artifact pgadmin-org#9570 wanted gone, and CodeMirror's crosshair cannot be limited to an active drag. This brings back block selection (pgadmin-org#9864, pgadmin-org#10029) while keeping pgadmin-org#9570's intent (no crosshair on the Alt+F5 shortcut). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
c5fe8e8 to
09fe9d6
Compare
There was a problem hiding this comment.
Pull request overview
Restores the CodeMirror editor’s longstanding Alt/Option+drag rectangular (column) selection gesture that was regressed by the earlier #9570 fix, while keeping the “no crosshair cursor when Alt is held” behavior.
Changes:
- Restore default
rectangularSelection()behavior (Alt/Option+drag) in the editor. - Remove
crosshairCursorusage so holding Alt (e.g., for Alt+F5) no longer shows a crosshair cue. - Add v9.16 release note entry for the regression fix.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| web/pgadmin/static/js/components/ReactCodeMirror/components/Editor.jsx | Restores default rectangular selection gesture and removes crosshair cursor extension. |
| docs/en_US/release_notes_9_16.rst | Documents the rectangular selection regression fix in v9.16 release notes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Bug fixes | ||
| ********* | ||
|
|
||
| | `Issue #9864 <https://github.com/pgadmin-org/pgadmin4/issues/9864>`_ - Fixed a regression where the rectangular (block/column) text selection in the code editor stopped working; restored the default Alt+drag selection without re-introducing the crosshair cursor on Alt+F5 (#9570). |
Summary
Fixes #9864 and #10029.
The fix for #9570 (commit 3598840) stopped Alt+F5 from showing a crosshair cursor, but did so by changing the editor's rectangular-selection
eventFilterto require Alt+Ctrl and moving the crosshair cue to Control. That broke the long-standing Alt+drag block/column selection (reported in #9864 and #10029) and left the crosshair cue inconsistent with the actual gesture.Fix: restore the default
rectangularSelection()(Alt+drag) and removecrosshairCursorentirely.crosshairCursoronly keys off a held modifier (it can't be limited to an active drag), so dropping it is the clean reconciliation.Changes
Editor.jsx:rectangularSelection()restored;crosshairCursorimport + usage removed.🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
Bug Fixes