Repository navigation
fix: prevent search selection auto-scroll - #559
phurpa-tsering merged 1 commit into
Conversation
|
Thanks @igorzelaya-io for the fix and the regression test, and for tracing the cause so clearly. One change before we can merge: we do development on the beta branch, not main, so this PR needs to target beta. Could you:
Once it's on beta, we'll finish reviewing and merge it there. Thanks! |
759a38d to
b8569e4
Compare
|
Rebased bugfix/prevent-selection-auto-scroll onto the current beta branch and force-pushed with lease as requested. The PR is now based on beta and GitHub reports it mergeable. After the rebase, beta already contains the hidden-panel helper and regression test, so this branch now only wires CodeEditor to createHiddenSearchPanel. The focused regression test passes (1/1). |
phurpa-tsering
left a comment
There was a problem hiding this comment.
Thanks @igorzelaya-io, this looks good from our side! We reproduced the auto-scroll on beta and confirmed your change fixes it, with Find still working as expected. Thanks for the clear root-cause write-up and for contributing! 🙌
Fixes #558
Summary
Root cause
Voiden renders its persistent Find controls outside CodeMirror, but still opens an empty internal panel to initialize CodeMirror search state. Custom CodeMirror panels default to the bottom unless the returned panel specifies
top: true. Because the internal panel group is hidden, CodeMirror measured it as a full-height bottom scroll margin. Its drag-selection logic therefore treated ordinary pointer positions as below the viewport and continuously scrolled downward.Verification
vitest --config vitest.config.ts run src/core/editors/code/__test__/hiddenSearchPanel.test.ts(passes)scrollTopduring a held, mid-viewport drag; the regression test now asserts a zero bottom marginExisting baseline issues
The full UI run completed 188 tests successfully but still has one unrelated pipeline assertion failure and one existing plugin mock suite error.