feat(editor): improve database & table behavior (#15100)

fix #14982
fix #15028
fix #15099

#### PR Dependency Tree


* **PR #15100** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Prevented Enter handling during IME composition to avoid unintended
input.
* Avoided overwriting external native selections when interacting with
tables.
* Improved validation of inline text selection ranges for more reliable
behavior.

* **Enhancements**
* Scoped and refined text-selection styling and editability within
tables and cells.
  * Added managed sorting for Kanban views to control card ordering.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
DarkSky
2026-06-11 13:50:23 +08:00
committed by GitHub
parent 07a08e6d4d
commit 6a2b73e76f
7 changed files with 165 additions and 8 deletions
@@ -213,20 +213,22 @@ export class RangeBinding {
return;
}
const startElement = getElement(range.startContainer);
const endElement = getElement(range.endContainer);
const hasInlineEndpoint =
!!startElement?.closest('v-text') || !!endElement?.closest('v-text');
const el = getElement(range.commonAncestorContainer);
if (!el) return;
const closestExclude = el.closest(`[${RANGE_SYNC_EXCLUDE_ATTR}="true"]`);
if (closestExclude) return;
if (closestExclude && !hasInlineEndpoint) return;
const closestEditable = el.closest('[contenteditable]');
if (!closestEditable) return;
const startElement = getElement(range.startContainer);
const endElement = getElement(range.endContainer);
if (!closestEditable && !hasInlineEndpoint) return;
// if neither start nor end is in a v-text, the range is invalid
if (!startElement?.closest('v-text') && !endElement?.closest('v-text')) {
if (!hasInlineEndpoint) {
this._prevTextSelection = null;
this.selectionManager.clear(['text']);