toeverything/blocksuite

Linkeddoc can not query with IME

lawvs opened this issue · 1 comments

The LinkedDocPopover disappears when inputting with an IME.

Screen.Recording.2024-09-23.at.15.43.20.mov
Screen.Recording.2024-09-23.at.15.44.16.mov

Related to #8368

Debug stack:

LinkedDocPopover
  connectedCallback
    createKeydownObserver onInput
      this.inlineEditor.slots.renderComplete.once(this._updateLinkedDocGroup);

  _updateLinkedDocGroup
    const query = this._query;
    if (query === null) { this.abortController.abort(); }

  private get _query() {
    return getQuery(this.inlineEditor, this._startRange);
  }

getQuery
  const textNode = nativeRange.startContainer;
  if (textNode.nodeType !== Node.TEXT_NODE) {
    return null;
  }

Fixed in #8481