Skip to content

Patch issue#655 - SplitPanel Enhancements / Fixes#657

Open
Orbisman wants to merge 2 commits intomabe02:masterfrom
Orbisman:Patch_Issue#655
Open

Patch issue#655 - SplitPanel Enhancements / Fixes#657
Orbisman wants to merge 2 commits intomabe02:masterfrom
Orbisman:Patch_Issue#655

Conversation

@Orbisman
Copy link

See Issue #655 for details.

  • Added keystroke handing for UP/DOWN/LEFT/RIGHT ARROW keys.
  • Moved resizing code to private function
  • First Mouse click will focus component before allowing it to be dragged
  • Used same handleKeystroke() layout as table to be be consistent
  • Added call to invalidate() at the end of the resize() function to fix the mouse dragging issue.
  • When resizing, use the area width/height when resizing components
    Note: Updated SplitPanelTest to add additional Splits with Multiline Textbox to show how the components where not expanding

Testing requires the mouse capture turned on in the TestBase class, ie.
Screen screen = new TestTerminalFactory(args).setMouseCaptureMode(MouseCaptureMode.CLICK_AUTODETECT).createScreen();

@kevintanhongann
Copy link

if there are no conflicts with the base branch, please merge.

@ginkoblongata
Copy link
Contributor

ginkoblongata commented Jan 25, 2026

This is not the way to go, this should not be merged.
It breaks in many ways, and the code looks like it's regressed significantly.

--> "First Mouse click will focus component before allowing it to be dragged"

I disagree that this detail should be the mechanism.

It is a matter of opinion I suppose. I think this happens in a couple of different ways on the various well known desktops.

The behavior that I strongly favor is that of basically "mouse click brings focus to component and start of dragging has begun".
Otherwise the user has to click again for the dragging when that activity is non destructive.

Setting aside preferences, this change no longer performs the drag correctly even with the extraneous user clicking.

@ginkoblongata
Copy link
Contributor

ginkoblongata commented Feb 5, 2026

@Orbisman
I have incorporated your changes into pull request #661 and am recommending that be merged and this #657 to not be merged.

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.

3 participants