prosemirror-view 1.33.4 → 1.33.5

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 1.33.5 (2024-04-22)
2
+
3
+ ### Bug fixes
4
+
5
+ Fix a regression in composition handling in 1.33.3 that occurs for some IMEs when starting composition on an empty line.
6
+
1
7
  ## 1.33.4 (2024-04-08)
2
8
 
3
9
  ### Bug fixes
package/dist/index.cjs CHANGED
@@ -3248,7 +3248,7 @@ function findCompositionNode(view) {
3248
3248
  if (!(!descBefore || !descBefore.isText(textBefore.nodeValue))) return textAfter;
3249
3249
  }
3250
3250
  }
3251
- return textBefore;
3251
+ return textBefore || textAfter;
3252
3252
  }
3253
3253
  function timestampFromCustomEvent() {
3254
3254
  var event = document.createEvent("Event");
package/dist/index.js CHANGED
@@ -3468,7 +3468,7 @@ function findCompositionNode(view) {
3468
3468
  return textAfter;
3469
3469
  }
3470
3470
  }
3471
- return textBefore;
3471
+ return textBefore || textAfter;
3472
3472
  }
3473
3473
  function timestampFromCustomEvent() {
3474
3474
  let event = document.createEvent("Event");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prosemirror-view",
3
- "version": "1.33.4",
3
+ "version": "1.33.5",
4
4
  "description": "ProseMirror's view component",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
package/src/input.ts CHANGED
@@ -526,7 +526,7 @@ export function findCompositionNode(view: EditorView) {
526
526
  return textAfter
527
527
  }
528
528
  }
529
- return textBefore
529
+ return textBefore || textAfter
530
530
  }
531
531
 
532
532
  function timestampFromCustomEvent() {