Skip to content

Restore Alt+drag rectangular selection in the editor (#9864, #10029)#10043

Open
dpage wants to merge 1 commit into
pgadmin-org:masterfrom
dpage:fix-9864-10029-rectangular-selection
Open

Restore Alt+drag rectangular selection in the editor (#9864, #10029)#10043
dpage wants to merge 1 commit into
pgadmin-org:masterfrom
dpage:fix-9864-10029-rectangular-selection

Conversation

@dpage

@dpage dpage commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

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 eventFilter to 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 remove crosshairCursor entirely.

Changes

  • Editor.jsx: rectangularSelection() restored; crosshairCursor import + usage removed.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Added pgAdmin 4 v9.16 release notes documenting updates and improvements, including support for PostgreSQL and EDB Advanced Server with bundled PostgreSQL utilities version 18.2.
  • Bug Fixes

    • Fixed regression affecting rectangular text selection in the code editor.

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@dpage, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9c5b7908-3302-41fc-b6be-cb42e86e8720

📥 Commits

Reviewing files that changed from the base of the PR and between 435a1d0 and 09fe9d6.

📒 Files selected for processing (2)
  • docs/en_US/release_notes_9_16.rst
  • web/pgadmin/static/js/components/ReactCodeMirror/components/Editor.jsx

Walkthrough

The pull request fixes rectangular text selection behavior in the CodeMirror code editor by removing the crosshairCursor configuration and making rectangularSelection() unconditional. It then documents this fix and other v9.16 release information in new release notes.

Changes

v9.16 Release Notes and Rectangular Selection Fix

Layer / File(s) Summary
Rectangular selection configuration fix
web/pgadmin/static/js/components/ReactCodeMirror/components/Editor.jsx
crosshairCursor is removed from imports, and rectangularSelection() changes from a conditional call (filtering for alt+ctrl keys) to an unconditional call. Comments explain the intentional omission of crosshairCursor to preserve the block-selection fix.
v9.16 Release Notes
docs/en_US/release_notes.rst, docs/en_US/release_notes_9_16.rst
Release notes for v9.16 are initialized with document structure, metadata (header, TBD release date, scope), supported database servers, bundled PostgreSQL utilities (v18.2), section headings for features, and a bug fixes entry documenting Issue #9864's rectangular selection fix.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • pgadmin-org/pgadmin4#9763: Both PRs modify rectangular selection and crosshairCursor configuration in the same Editor.jsx file, with this PR removing crosshairCursor entirely and the prior PR initially adjusting the selection filter and crosshairCursor scope.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly describes the main change: restoring Alt+drag rectangular selection in the editor, which is the primary focus of the code changes in Editor.jsx.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@dpage dpage force-pushed the fix-9864-10029-rectangular-selection branch 2 times, most recently from 39709bf to c5fe8e8 Compare June 9, 2026 11:36
…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>
@dpage dpage force-pushed the fix-9864-10029-rectangular-selection branch from c5fe8e8 to 09fe9d6 Compare June 9, 2026 11:37
@asheshv asheshv requested a review from Copilot June 10, 2026 14:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 crosshairCursor usage 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).
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.

pgAdmin 9.14 the column selection (Alt/Option + right mouse) drag no longer work

2 participants