Select cell on pointerdown so clicking another cell selects it while editing #5078
+1
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes an issue where clicking on a different cell while a cell was in edit mode did not correctly switch selection.
The event listener has been adjusted to select the cell on pointerdown instead of waiting for later events.
This ensures consistent selection behavior, especially during active editing.
This pr Fixes #4892
Technical details
* Updated the logic in SheetDataCell.svelte to trigger selection earlier in the pointer lifecycle
*Ensures smooth transitions when moving between cells while editing
*Verified formatting, linting, and tests run successfully inside mathesar_service_dev
Checklist
My pull request has a descriptive title
My pull request targets the develop branch of the repository
My commit messages follow best practices
My code follows the established code style of the repository
I tried running the project locally in mathesar_service_dev
I ran npm run format, npm run lint, and npm test successfully in the dev container