@dxos/react-ui-editor 0.6.13-main.09887cd → 0.6.13-main.ed424a1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5268,7 +5268,7 @@ var useTextEditor = (props = {}, deps = []) => {
5268
5268
  }
5269
5269
  const state2 = EditorState2.create({
5270
5270
  doc: initialValue,
5271
- selection: initialSelection,
5271
+ // selection: initialSelection,
5272
5272
  extensions: [
5273
5273
  id && documentId.of(id),
5274
5274
  extensions,
@@ -5321,6 +5321,19 @@ var useTextEditor = (props = {}, deps = []) => {
5321
5321
  parentRef.current?.removeAttribute("data-tabster");
5322
5322
  }
5323
5323
  if (scrollTo || selection) {
5324
+ if (selection && selection.anchor > view.state.doc.length) {
5325
+ log8.warn("invalid selection", {
5326
+ length: view.state.doc.length,
5327
+ scrollTo,
5328
+ selection
5329
+ }, {
5330
+ F: __dxlog_file11,
5331
+ L: 149,
5332
+ S: void 0,
5333
+ C: (f, a) => f(...a)
5334
+ });
5335
+ return;
5336
+ }
5324
5337
  view.dispatch(createEditorStateTransaction(view.state, {
5325
5338
  scrollTo,
5326
5339
  selection