@bitbindle/prosemirror-view 0.0.0-stage → 1.44.1

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 ADDED
@@ -0,0 +1,2639 @@
1
+ ## 1.44.1 (2026-12-04)
2
+
3
+ ### Bug fixes
4
+
5
+ Bias selection normalization for clicks between textblocks using the position of the click.
6
+
7
+ Restore the workaround for Safari's out-of-order key events when confirming a composition with Enter, which had stopped working in 1.43.0.
8
+
9
+ Fix a bug that caused a double-click between textblocks to create an invalid text selection.
10
+
11
+ Avoid briefly showing the default selection at the start of the document when focusing the editor by clicking it.
12
+
13
+ Make sure simple touchscreen taps run click handling logic, which they stopped doing in 1.43.0.
14
+
15
+ ## 1.44.0 (2026-11-24)
16
+
17
+ ### Bug fixes
18
+
19
+ Fix an issue on Safari where clicking an unfocused editor at its current cursor position would reset the selection to the document start.
20
+
21
+ Make `posAtCoords` return a more appropriate position for coordinates next to a line-wrapped textblock.
22
+
23
+ When putting the cursor on a line wrap point with the mouse, try to make the DOM cursor show up on the proper side of the wrap point.
24
+
25
+ Make moving the selection into an uneditable editor with a double-click work.
26
+
27
+ ### New features
28
+
29
+ `posAtCoords` now returns an affinity value that suggests which side of the position the coords are associated with.
30
+
31
+ ## 1.43.1 (2026-11-23)
32
+
33
+ ### Bug fixes
34
+
35
+ Make sure the selection is properly synced to the inside of an inline node with content when coming from right outside it.
36
+
37
+ Fix an issue where drag selection no longer worked in an uneditable editor.
38
+
39
+ ## 1.43.0 (2026-11-19)
40
+
41
+ ### Breaking changes
42
+
43
+ Remove Internet Explorer support from the library.
44
+
45
+ ### Bug fixes
46
+
47
+ Make decoration set child lookup faster by using a binary search.
48
+
49
+ Fix quadratic complexity in view updates of big nodes with lots of marks.
50
+
51
+ Fix a crash that could occur when pasting content copied from a ProseMirror editor with a different schema.
52
+
53
+ Mouse selection is now handled by the library, rather than the browser, to avoid issues with random interruptions and flickering.
54
+
55
+ Fix a regression that broke passing unsorted arrays of decorations to `DecorationSet.add`.
56
+
57
+ Fix an issue that could cause odd cursor motion in block nodes with internal structure.
58
+
59
+ Fix an issue where changes in a text node with a decoration wrapper would needlessly redraw the entire node.
60
+
61
+ Dispatching a transaction right after the user changes the selection but before the corresponding `selectionchange` fires will now, if possible, no longer overwrite that selection change.
62
+
63
+ Avoid getting stuck in a composition when a browser fails to fire its compositionend event.
64
+
65
+ Avoid needlessly resetting DOM attributes when redrawing the full document.
66
+
67
+ Take care to recompute the editor root when the editor was disconnected.
68
+
69
+ Only pass `plain` as true to `transformPasted` when the user explicitly chose a plain text paste.
70
+
71
+ Make sure DOM selection changes and mutations are read before a key is handled.
72
+
73
+ ### New features
74
+
75
+ The new `adjustSelectionFromDOM` prop can be used to check and adjust selections read from the browser DOM.
76
+
77
+ ## 1.42.9 (2026-10-31)
78
+
79
+ ### Bug fixes
80
+
81
+ Avoid a crash in the workaround for dropped backspace events on Chrome Android.
82
+
83
+ Fix an issue where `handleKeyDown` could be called multiple time for a single backspace press.
84
+
85
+ Fix an issue where the editor could dispatch Enter or Backspace keys during composition.
86
+
87
+ Remove an obsolete kludge that could interfere with the selection on focus.
88
+
89
+ Fix an issue that could cause a selection change right after focus to be overwritten by the old selection.
90
+
91
+ ## 1.42.8 (2026-10-24)
92
+
93
+ ### Bug fixes
94
+
95
+ Fix a regression since 1.42.6 that causes widgets that render as non-element nodes to no longer be wrapped, and document fragment widgets to be entirely dropped.
96
+
97
+ ## 1.42.7 (2026-10-22)
98
+
99
+ ### Bug fixes
100
+
101
+ Fix an issue where some kinds of changes inside inline nodes with content were inappropriately treated as backspace events.
102
+
103
+ Fix some selection issues in a shadow root on Safari by working around the relevant browser bugs.
104
+
105
+ Improve cursor motion across non-text in blocks that don't have the same text direction as the editor as a whole.
106
+
107
+ Fix an issue where decoration sets with lots of node decorations inside a single parent would require quadratic time to update.
108
+
109
+ Fix a regression in `posAtDOM` (and DOM selection reading) when the position is outside the nearest node's content DOM, but not directly in its outer element.
110
+
111
+ Avoid a selection read in DOM flushing when the editor doesn't have focus.
112
+
113
+ ## 1.42.6 (2026-09-25)
114
+
115
+ ### Bug fixes
116
+
117
+ Work around an issue in Firefox where horizontal cursor motion would refuse to stop between an inline atom node and the start of a line.
118
+
119
+ On Safari and Firefox, work around skipped cursor positions and odd cursor drawing by putting a dummy node in front of atomic inline nodes when they appear at the start of the block or right after another atom.
120
+
121
+ Fix an issue where `posAtDOM` would incorrectly return a position before a node when querying a DOM position outside of its content element but inside of a wrapping element.
122
+
123
+ Work around a Firefox bug that causes content wrapped in a scrollable element to be skipped over in keyboard cursor motion.
124
+
125
+ Improve performance of non-DOM-connected editors by avoiding DOM selection queries.
126
+
127
+ ## 1.42.5 (2026-09-21)
128
+
129
+ ### Bug fixes
130
+
131
+ Fix an issue where some kinds of deletions on Chrome Android were interpreted as Enter presses.
132
+
133
+ Fix a regression where some types of Enter presses on Android would not go through the Enter key handling.
134
+
135
+ ## 1.42.4 (2026-09-18)
136
+
137
+ ### Bug fixes
138
+
139
+ Prevent uneditable elements rendered as part of node or mark view from blocking cursor motion.
140
+
141
+ Fix a bug that could break some types of composition input starting with a non-empty selection.
142
+
143
+ ## 1.42.3 (2026-08-25)
144
+
145
+ ### Bug fixes
146
+
147
+ Don't set `contenteditable=false` on widgets that already have a `contenteditable` attribute.
148
+
149
+ Fix a bug that broke pasting when there was a default trusted type policy defined without a `createHTML` function.
150
+
151
+ Run attribute validators on attributes provided via slice context in clipboard content. This closes an XSS vulnerability (found by Pedro Paniago).
152
+
153
+ ## 1.42.2 (2026-07-24)
154
+
155
+ ### Bug fixes
156
+
157
+ Enable a workaround for backspace not taking effect on Android for Firefox as well as Chrome (for which it already kicked in).
158
+
159
+ Work around the situation where Chrome/Webkit replace a node's content DOM with a completely different element.
160
+
161
+ ## 1.42.1 (2026-07-11)
162
+
163
+ ### Bug fixes
164
+
165
+ Don't scroll to a bogus position when trying to scroll an element that has no layout into view.
166
+
167
+ ## 1.42.0 (2026-07-01)
168
+
169
+ ### Bug fixes
170
+
171
+ The clipboard content parser now inlines simple styles defined in the pasted HTML before parsing it, since some applications output their styling that way.
172
+
173
+ ### New features
174
+
175
+ Mark views now also support an `update` method.
176
+
177
+ ## 1.41.9 (2026-06-10)
178
+
179
+ ### Bug fixes
180
+
181
+ Allow triple-click drag selection.
182
+
183
+ Adjust an existing workaround to work around the fact that Chrome no longer fires key events for backspace during composition.
184
+
185
+ ## 1.41.8 (2026-04-02)
186
+
187
+ ### Bug fixes
188
+
189
+ Make the types reflect that mark and node views should render elements, not any DOM node.
190
+
191
+ Fix a bug causing `dragCopies` to be ignored when it returned false.
192
+
193
+ ## 1.41.7 (2026-03-18)
194
+
195
+ ### Bug fixes
196
+
197
+ Work around a Chrome bug where it sometimes inserts a random `<br>` node when you press backspace before a widget.
198
+
199
+ Fix a crash that could happen when deleting content during a node drag.
200
+
201
+ ## 1.41.6 (2026-02-06)
202
+
203
+ ### Bug fixes
204
+
205
+ Fix an issue where backspacing content before a flexbox or grid styled widget would insert a bogus line break on Firefox.
206
+
207
+ ## 1.41.5 (2026-01-14)
208
+
209
+ ### Bug fixes
210
+
211
+ Work around an issue where, after some kinds of changes, Chrome misreports the cursor position and breaks composition.
212
+
213
+ Improve DOM update behavior when deleting three or more nodes right before a mark, which would unnecessarily re-render the entire mark.
214
+
215
+ Work around a newly introduced bug in Safari where composition in an empty table cell causes it to move the text out of the cell into the row element.
216
+
217
+ ## 1.41.4 (2025-12-01)
218
+
219
+ ### Bug fixes
220
+
221
+ `EditorView.dragging` is now only cleared after the drop event has entirely been handled.
222
+
223
+ Add a workaround for an issue where Chrome and Safari will, if you backspace out the last text before an inline-flex node, insert a bogus hard break.
224
+
225
+ Fix a composition problem on Chrome Windows when starting a composition before an absolutely positioned widget.
226
+
227
+ ## 1.41.3 (2025-10-09)
228
+
229
+ ### Bug fixes
230
+
231
+ Fix a bug where typing when the selection crosses inline node boundaries was ignored in some situations.
232
+
233
+ ## 1.41.2 (2025-09-29)
234
+
235
+ ### Bug fixes
236
+
237
+ Fix an issue where some Backspace presses with SwiftKey on Android would get interpreted as Enter.
238
+
239
+ ## 1.41.1 (2025-09-19)
240
+
241
+ ### Bug fixes
242
+
243
+ Consistently set `draggable` on a node's inner DOM representation, not a decoration wrapper element.
244
+
245
+ ## 1.41.0 (2025-09-06)
246
+
247
+ ### Bug fixes
248
+
249
+ Make sure `transformPasted` is properly called when pasting into a code block.
250
+
251
+ Fix an issue where the editor didn't properly set the DOM selection in a shadow DOM on Safari in some situations.
252
+
253
+ Work around a Safari issue that broke composition right after changing the set of active marks.
254
+
255
+ ### New features
256
+
257
+ Pass an argument to `transformPasted` that tells the handler whether the paste is plain text. Call transformPasted when pasting into a code block
258
+
259
+ ## 1.40.1 (2025-07-18)
260
+
261
+ ### Bug fixes
262
+
263
+ Fix an issue where, for some Android virtual keyboards, joining textblocks that contain an image with Backspace would run the handler for Enter instead.
264
+
265
+ Fix an issue causing `posAtCoords` to get confused by table cells sticking out of their parent row elements.
266
+
267
+ ## 1.40.0 (2025-06-02)
268
+
269
+ ### Bug fixes
270
+
271
+ Suppress lint warnings about dereferencing methods by making `EditorView.dispatch` a property instead of a method.
272
+
273
+ ### New features
274
+
275
+ The `"handleTextInput"` prop now takes an additional argument that can be used to generate the default transaction for that text change.
276
+
277
+ Widget decorations now support a `relaxedSide` option which can be used to allow the DOM cursor to appear at either side.
278
+
279
+ ## 1.39.3 (2025-05-14)
280
+
281
+ ### Bug fixes
282
+
283
+ Fix an issue where clicks using different mouse buttons could be grouped into a single double- or triple-click.
284
+
285
+ Only delete the selection when starting a composition when it crosses block boundaries.
286
+
287
+ ## 1.39.2 (2025-04-22)
288
+
289
+ ### Bug fixes
290
+
291
+ Default to using `trustedTypes.defaultPolicy` for clipboard input, when available.
292
+
293
+ Fix an issue where pasting multiple lines from the virtual keyboard on Android would have only the effect of an enter press.
294
+
295
+ ## 1.39.1 (2025-04-04)
296
+
297
+ ## 1.39.0 (2025-04-04)
298
+
299
+ ### Bug fixes
300
+
301
+ Fix an issue where, with some types of schemas, pressing Enter on Android with a Chinese keyboard wouldn't properly detect the Enter press.
302
+
303
+ ### New features
304
+
305
+ The new `dragCopies` prop can be used to configure whether a drag event inside the editor copies or moves content.
306
+
307
+ ## 1.38.1 (2025-03-04)
308
+
309
+ ### Bug fixes
310
+
311
+ Fix a regression in 1.38.0 that breaks scrolling back to the selection after Chrome tries to reset it on focus.
312
+
313
+ Remove some internally used types from the public type declaration files. Include file extension in web test local imports
314
+
315
+ Fix an issue where scrolling the cursor into view could inappropriately scroll parent nodes of absolutely positioned elements.
316
+
317
+ ## 1.38.0 (2025-02-12)
318
+
319
+ ### New features
320
+
321
+ The clipboard serialization logic is now available as a `serializeToClipboard` method on the view object.
322
+
323
+ ## 1.37.2 (2025-01-22)
324
+
325
+ ### Bug fixes
326
+
327
+ Fix a bug that caused `EditorView.nodeDOM` to sometimes not return a DOM node when querying a node next to a widget.
328
+
329
+ Fix an issue where an editor would, when scrolling the selection into view, try to do so even if the selection wasn't in that editor.
330
+
331
+ ## 1.37.1 (2024-12-11)
332
+
333
+ ### Bug fixes
334
+
335
+ Fix an issue where `display: content` elements could break `posAtCoords`.
336
+
337
+ Work around an issue with Chrome reporting the selection incorrectly during composition.
338
+
339
+ ## 1.37.0 (2024-11-23)
340
+
341
+ ### Bug fixes
342
+
343
+ Fix an issue on Safari where the (incorrect) top-level selection was used, instead of the workaround that also works inside shadow roots.
344
+
345
+ ### New features
346
+
347
+ Mark views can now provide an `ignoreMutation` method. Add ViewMutationRecord to doc template
348
+
349
+ ## 1.36.0 (2024-11-05)
350
+
351
+ ### Bug fixes
352
+
353
+ Don't recreated `TrustedTypePolicy` objects for every paste.
354
+
355
+ ### New features
356
+
357
+ Add support for a `destroy` method on custom mark views. Add MarkView to the doc template
358
+
359
+ ## 1.35.0 (2024-10-29)
360
+
361
+ ### New features
362
+
363
+ The new `NodeView.multiType` flag is now required to opt into handling different node types in a single node view. It used to be the default, but this tripped too many people up.
364
+
365
+ ## 1.34.3 (2024-09-19)
366
+
367
+ ### Bug fixes
368
+
369
+ Fix an issue that would, during some types of document updates, leave the document DOM in an improper form.
370
+
371
+ Handle the case where drag-selecting in Firefox creates a selection with multiple distinct ranges.
372
+
373
+ ## 1.34.2 (2024-09-03)
374
+
375
+ ### Bug fixes
376
+
377
+ Fix pasting in Chrome with the require-trusted-types-for CSP enabled.
378
+
379
+ Fix an issue where, for some kinds of IME on Windows, pressing Enter while in a composition would execute the resulting command on the wrong selection, erasing some typed content.
380
+
381
+ ## 1.34.1 (2024-08-26)
382
+
383
+ ### Bug fixes
384
+
385
+ Fix null dereferences caused by the behavior of Chrome's newly supported `caretPositionFromPoint` method.
386
+
387
+ Fix an issue where on Android, with GBoard, enter presses in code blocks while a spell correction was selected didn't insert a new line.
388
+
389
+ ## 1.34.0 (2024-08-23)
390
+
391
+ ### New features
392
+
393
+ The `DecorationGroup` interface now has a `forEachSet` method to iterate though the contained decoration sets.
394
+
395
+ ## 1.33.11 (2024-08-19)
396
+
397
+ ### Bug fixes
398
+
399
+ Delete the selection on composition start when on a mark boundary to force Chrome to apply the correct style to the composition.
400
+
401
+ When the browser starts a composition and the selection spans across blocks, start by clearing it to make sure the composed text node lands in a valid position.
402
+
403
+ ## 1.33.10 (2024-08-13)
404
+
405
+ ### Bug fixes
406
+
407
+ Prevent triple clicks and clicks on atom nodes from dispatching a selection update when the new selection is equal to the current selection.
408
+
409
+ Don't crash when `window.getSelection()` returns null.
410
+
411
+ Create a cursor wrapper when starting a composition with a selection that spans mark boundaries, to avoid odd DOM forms created by Chrome in such a situation.
412
+
413
+ ## 1.33.9 (2024-07-18)
414
+
415
+ ### Bug fixes
416
+
417
+ Fix an issue where dragging an image on Chrome versions before 121 failed to put the image file in the clipboard data.
418
+
419
+ Enable cross-site scripting protection hack when rendering nodes and marks inside the editor.
420
+
421
+ ## 1.33.8 (2024-06-11)
422
+
423
+ ### Bug fixes
424
+
425
+ When composition happens with the cursor between two text nodes, use the last mutated one to guess which one is being changed.
426
+
427
+ ## 1.33.7 (2024-05-31)
428
+
429
+ ### Bug fixes
430
+
431
+ Ignore stray `<br>` nodes added to parent list elements when backspacing near uneditable content in Firefox.
432
+
433
+ Fix a crash where the editor tried to call `removeAttribute` on a text node.
434
+
435
+ Fix an issue where coordinates near nested blocks could inappropriately be assigned to be inside those blocks.
436
+
437
+ ## 1.33.6 (2024-04-30)
438
+
439
+ ### Bug fixes
440
+
441
+ Make sure the content slice stored for an in-editor drag is the one that was transformed by `transformCopied`.
442
+
443
+ ## 1.33.5 (2024-04-22)
444
+
445
+ ### Bug fixes
446
+
447
+ Fix a regression in composition handling in 1.33.3 that occurs for some IMEs when starting composition on an empty line.
448
+
449
+ ## 1.33.4 (2024-04-08)
450
+
451
+ ### Bug fixes
452
+
453
+ When available, use `Selection.getComposedRanges` on Safari to find the selection inside a shadow DOM.
454
+
455
+ ## 1.33.3 (2024-03-22)
456
+
457
+ ### Bug fixes
458
+
459
+ Further improve preserving of compositions for IME systems that keep the cursor before the composed text.
460
+
461
+ ## 1.33.2 (2024-03-21)
462
+
463
+ ### Bug fixes
464
+
465
+ Improve Android backspace detection when the native effect is to delete an entire block element.
466
+
467
+ Fix a bug where reconfiguring node views caused the editor to lose focus.
468
+
469
+ Fix an issue where some commands didn't properly scroll the cursor into view on Mobile Safari.
470
+
471
+ Fix a bug where starting a composition with stored marks or after a noninclusive mark, with an IME that keeps the cursor at the start of the composed text (like many Chinese IMEs) disrupted composition on Chrome.
472
+
473
+ Fix a memory leak where a (single) destroyed editor could be kept alive through a reused `Range` object.
474
+
475
+ ## 1.33.1 (2024-02-15)
476
+
477
+ ### Bug fixes
478
+
479
+ Fix a type error in the published type declarations in 1.33.0.
480
+
481
+ ## 1.33.0 (2024-02-15)
482
+
483
+ ### New features
484
+
485
+ The `DecorationSource.forChild` method is now public.
486
+
487
+ ## 1.32.7 (2023-12-18)
488
+
489
+ ### Bug fixes
490
+
491
+ Fix a regression that caused widget decorations directly after a node to not get drawn in some situations.
492
+
493
+ ## 1.32.6 (2023-12-08)
494
+
495
+ ### Bug fixes
496
+
497
+ Fix a bug that could cause view updates to crash in rare situations where inline nodes were added around decorations.
498
+
499
+ ## 1.32.5 (2023-12-04)
500
+
501
+ ### Bug fixes
502
+
503
+ Fix a bug in `DecorationSet.map` that, in specific cases when mapping through groups of changes, move decorations to the wrong position.
504
+
505
+ ## 1.32.4 (2023-11-08)
506
+
507
+ ### Bug fixes
508
+
509
+ Fix a case where a DOM change involving astal characters could create odd steps that started and ended in the middle of UTF16 surrogate pairs.
510
+
511
+ Dragging a draggable node will no longer implicitly select it.
512
+
513
+ ## 1.32.3 (2023-11-01)
514
+
515
+ ### Bug fixes
516
+
517
+ Fix a bug where, in some situations, pasting plain text pasted HTML markup.
518
+
519
+ ## 1.32.2 (2023-10-27)
520
+
521
+ ### Bug fixes
522
+
523
+ Check for text/uri-list data on the clipboard or in the drop event when pasting or dropping content, since some types of copying on Apple devices use this format.
524
+
525
+ ## 1.32.1 (2023-10-13)
526
+
527
+ ### Bug fixes
528
+
529
+ Work around a Chrome issue where it didn't draw a selection for inline leaf nodes when selecting across them.
530
+
531
+ Override the native behavior when shift-selecting horizontally across non-text inline nodes, since most browsers behave poorly here.
532
+
533
+ ## 1.32.0 (2023-09-27)
534
+
535
+ ### Bug fixes
536
+
537
+ Work around an issue on Chrome where, when clicking above the right side of an uneditable node, the cursor would be put after the node.
538
+
539
+ Fix a bug that could corrupt the composition when it occurs next to text identical to the composed characters.
540
+
541
+ ### New features
542
+
543
+ The new `EditorView.updateRoot` method can be used to make the editor update its DOM root when it is moved to a new document or shadow tree.
544
+
545
+ ## 1.31.8 (2023-09-12)
546
+
547
+ ### Bug fixes
548
+
549
+ Fix a bug that broke arrow motion near uneditable nodes on Chrome in some situations.
550
+
551
+ Fix an issue that broke backspace at the end of a textblock that ended in a newline on Chrome.
552
+
553
+ Fix a crash in the way inline decorations that ended right after a node end position were drawn.
554
+
555
+ ## 1.31.7 (2023-07-28)
556
+
557
+ ### Bug fixes
558
+
559
+ Fix a bug where, when a compositionend event was received before the composition's final changes were processed, the resulting transaction didn't have its composition metadata set.
560
+
561
+ Fix an issue that caused cursor motion to stop at uneditable nodes that aren't widget decorations.
562
+
563
+ When scrolling an element higher than the viewport into view, make sure its top is visible.
564
+
565
+ ## 1.31.6 (2023-07-14)
566
+
567
+ ### Bug fixes
568
+
569
+ Fix a bug that caused `posAtCoords` to return incorrect results for coordinates over inline-decorated text.
570
+
571
+ Don't try to scroll fixed-positioned elements into view by scrolling their parent elements.
572
+
573
+ ## 1.31.5 (2023-06-19)
574
+
575
+ ### Bug fixes
576
+
577
+ Fix a bug where the editor accidentally blocked shift-delete when the whole document is selected.
578
+
579
+ Bring back workaround for an issue where Firefox draws the cursor in the wrong place in a code block.
580
+
581
+ Fix an issue where Shift-Insert pastes pasted plain text (because Shift was being held).
582
+
583
+ Fix an issue where selecting across paragraph and starting a composition would update the state as if Enter was pressed and disrupt the composition.
584
+
585
+ ## 1.31.4 (2023-05-31)
586
+
587
+ ### Bug fixes
588
+
589
+ Make sure `destroy` is called on node views that are replaced by changing a node's markup.
590
+
591
+ ## 1.31.3 (2023-05-17)
592
+
593
+ ### Bug fixes
594
+
595
+ Fix an issue that could cause the clipboard parser to create invalid slices when parsing content containing isolating nodes.
596
+
597
+ Include CommonJS type declarations in the package to please new TypeScript resolution settings.
598
+
599
+ ## 1.31.2 (2023-05-10)
600
+
601
+ ### Bug fixes
602
+
603
+ Fix a bug that broke backspace after empty lines in code blocks on Firefox.
604
+
605
+ Make it possible for the `attributes` prop to override the `translate` attribute.
606
+
607
+ ## 1.31.1 (2023-05-01)
608
+
609
+ ### Bug fixes
610
+
611
+ Fix a bug that could cause a view crash on some kind of document updates.
612
+
613
+ ## 1.31.0 (2023-04-26)
614
+
615
+ ### Bug fixes
616
+
617
+ Fix an issue where, when the browser failed to return a cursor for a set of coordinates (as in a shadow root in Chrome) the library's own algorithm worked poorly for coordinates between lines in a textblock.
618
+
619
+ Improve performance of changing a parent node (by type or attributes) without modifying its children by reusing the DOM of the child nodes.
620
+
621
+ Fix an issue where, in right-to-left context, the left and right arrow keys could get stuck on a selectable leaf node because the editor was moving the selection in the wrong direction.
622
+
623
+ Fix a regression in `coordsAtPos` when querying the position of a line wrap.
624
+
625
+ ### New features
626
+
627
+ Attach a `"composition"` meta field to transactions generated from DOM changes.
628
+
629
+ ## 1.30.2 (2023-03-13)
630
+
631
+ ### Bug fixes
632
+
633
+ Fix an issue where `posAtCoords` could incorrectly return positions outside of a table when querying a coordinate inside it.
634
+
635
+ Update the type of the `getPos` callback to include undefined in its return type. Update broken link (ViewProps -> EditorProps) Also detect iOS enter when the new block type is a less common node
636
+
637
+ Fix an issue where Enter on iOS would sometimes not be handled by the library.
638
+
639
+ ## 1.30.1 (2023-02-04)
640
+
641
+ ### Bug fixes
642
+
643
+ Fix a bug that caused `posAtCoords` to always return the position after a leaf node when querying a position on top of the node's element.
644
+
645
+ Fix an issue where, when putting focus on the editor by clicking at the very start of the document, the editor would restore a previous selection.
646
+
647
+ ## 1.30.0 (2023-01-19)
648
+
649
+ ### New features
650
+
651
+ `EditorView` now has `pasteHTML` and `pasteText` methods which initiate paste handling.
652
+
653
+ ## 1.29.2 (2023-01-17)
654
+
655
+ ### Bug fixes
656
+
657
+ Make sure enter key handlers are called on Chrome Android when the cursor is in a position where the native behavior of Enter doesn't change the document.
658
+
659
+ Fix a crash that could occur when starting a composition at the end of a non-inclusive mark.
660
+
661
+ Fix a bug in (vertical) `endOfTextblock` that caused it to return falsely positive results inside textblocks that had a separate `contentDOM`.
662
+
663
+ ## 1.29.1 (2022-11-14)
664
+
665
+ ### Bug fixes
666
+
667
+ Fix a problem when returning decorations from an outer editor from the `decorations` prop.
668
+
669
+ ## 1.29.0 (2022-10-12)
670
+
671
+ ### Bug fixes
672
+
673
+ Fix an issue where HTML comments added to the clipboard by the OS throw off the clipboard parser.
674
+
675
+ Make sure Chrome Android's native behavior on pressing Enter in an empty nested list item is replaced by the result of the editor's Enter key handler.
676
+
677
+ ### New features
678
+
679
+ The `transformPastedHTML`, `transformPastedText`, `transformPasted`, `transformCopied`, and `clipboardTextSerializer` props are now passed the view instance as last argument.
680
+
681
+ ## 1.28.3 (2022-10-05)
682
+
683
+ ### Bug fixes
684
+
685
+ Work around the five-year-old Safari bug where it won't accurately report the selection inside shadow roots, which would break ProseMirror when put in shadow DOM.
686
+
687
+ ## 1.28.2 (2022-09-24)
688
+
689
+ ### Bug fixes
690
+
691
+ Avoid a crash in selection updates in a hidden editor on Safari.
692
+
693
+ ## 1.28.1 (2022-09-21)
694
+
695
+ ### Bug fixes
696
+
697
+ Fix an issue where the editor would reset its scroll position to the top of the document for any state reconfiguration, even if the document was unchanged.
698
+
699
+ ## 1.28.0 (2022-09-09)
700
+
701
+ ### Bug fixes
702
+
703
+ Fix an issue where the editor wouldn't realize it was focused on IE when IE's resize controls are on an element inside the content.
704
+
705
+ ### New features
706
+
707
+ The new `transformCopied` prop can be used to transform a copied/cut slice before it is serialized to the clipboard.
708
+
709
+ ## 1.27.2 (2022-08-19)
710
+
711
+ ### Bug fixes
712
+
713
+ Fix an issue where `DecorationSet.map`, given a mapping with multiple steps, could in some cases corrupt the decorations.
714
+
715
+ Stop calling `handleClick` when the mouse moved but failed to fire mousemove events (for example when dragging a scrollbar).
716
+
717
+ ## 1.27.1 (2022-08-16)
718
+
719
+ ### Bug fixes
720
+
721
+ Fix a bug in `DecorationSet.map` that could cause invalid mapping when step maps contain multiple replaced ranges.
722
+
723
+ Make sure that when the editor receives focus via tab or calling `.focus()` on its DOM element, the existing selection is restored.
724
+
725
+ Avoid collapsing of whitespace in Firefox when the editor doesn't have `white-space` set to `pre-wrap`.
726
+
727
+ ## 1.27.0 (2022-07-20)
728
+
729
+ ### Bug fixes
730
+
731
+ Fix a bug that in some situations caused composition to be disrupted on Chrome due to a workaround for another browser issue activating inappropriately.
732
+
733
+ ### New features
734
+
735
+ `EditorProps` now takes an optional type parameter that indicates the type of `this` in prop functions.
736
+
737
+ ## 1.26.5 (2022-07-07)
738
+
739
+ ### Bug fixes
740
+
741
+ Fix an issue where a composition happening at the same time as widget insertion/removal could corrupt the rendered DOM.
742
+
743
+ Fix a problem where `coordsAtPos` would look inside the DOM for atomic nodes, and sometimes return very odd positions that way.
744
+
745
+ ## 1.26.4 (2022-07-04)
746
+
747
+ ### Bug fixes
748
+
749
+ Avoid spurious type errors on `handleDOMEvents` by widening the type for unknown event objects.
750
+
751
+ ## 1.26.3 (2022-06-29)
752
+
753
+ ### Bug fixes
754
+
755
+ Work around a Safari bug where mutation records get delivered even though the observer wasn't observing when the mutations happened.
756
+
757
+ ## 1.26.2 (2022-06-22)
758
+
759
+ ### Bug fixes
760
+
761
+ Mark prosemirror.css as having side effects in package.json.
762
+
763
+ ## 1.26.1 (2022-06-13)
764
+
765
+ ### Bug fixes
766
+
767
+ Fix incorrect types for `handleDrop` and `decorations`. Document open properties on widget specs
768
+
769
+ ## 1.26.0 (2022-06-07)
770
+
771
+ ### New features
772
+
773
+ Export the `NodeViewConstructor` and `MarkViewConstructor` types. Include Node/MarkViewConstructor in doc template
774
+
775
+ ## 1.25.0 (2022-06-01)
776
+
777
+ ### New features
778
+
779
+ Mark views can now be specified with a separate editor prop, `markViews`, to make it easier to get the types right.
780
+
781
+ ## 1.24.1 (2022-05-30)
782
+
783
+ ### Bug fixes
784
+
785
+ Fix a regression that caused the key handler to crash.
786
+
787
+ ## 1.24.0 (2022-05-30)
788
+
789
+ ### Bug fixes
790
+
791
+ Fix an issue where bogus table wrappers could be added when copy-pasting table content nodes within an editor.
792
+
793
+ Fix a crash that could occur when two textblocks were joined in the editor DOM.
794
+
795
+ Treat ctrl-b/f/p/n on macOS similar to arrow key presses, anticipating cursor motion.
796
+
797
+ ### New features
798
+
799
+ Include TypeScript type declarations.
800
+
801
+ ## 1.23.13 (2022-04-26)
802
+
803
+ ### Bug fixes
804
+
805
+ Work around a hidden cursor issue in Chrome when a textblock ends in an uneditable node wrapped in a mark.
806
+
807
+ ## 1.23.12 (2022-04-08)
808
+
809
+ ### Bug fixes
810
+
811
+ Fix an issue where enter on Chrome Android could, in textblock nodes rendered with an inner content element, delete the text after the cursor.
812
+
813
+ ## 1.23.11 (2022-03-31)
814
+
815
+ ### Bug fixes
816
+
817
+ Fix an issue where a node view with a separate content wrapper node could sometimes lose its content on Chrome when backspacing out content due to unexpected DOM element recreation.
818
+
819
+ ## 1.23.10 (2022-03-22)
820
+
821
+ ### Bug fixes
822
+
823
+ Fix a crash in `DecorationSet.map` that could occur with some kinds of lift transformations.
824
+
825
+ ## 1.23.9 (2022-03-11)
826
+
827
+ ### Bug fixes
828
+
829
+ Make sure screen readers don't read the `<img>` nodes added as kludge for cursor behavior.
830
+
831
+ ## 1.23.8 (2022-03-10)
832
+
833
+ ### Bug fixes
834
+
835
+ Fix an issue where the editor needlessly interrupted composition with IME systems that keep the cursor at the start of the composition, such as some Pinyin input methods.
836
+
837
+ ## 1.23.7 (2022-02-25)
838
+
839
+ ### Bug fixes
840
+
841
+ Fix a crash when a view was being destroyed during input reading.
842
+
843
+ Fix a crash on Firefox when replacing text in some specific types of document structure.
844
+
845
+ ## 1.23.6 (2022-01-13)
846
+
847
+ ### Bug fixes
848
+
849
+ Fix an issue that could cause pieces of DOM to not be synchronized with the document after some kind of changes around marks.
850
+
851
+ Fix a bug where marks rendered with nested elements would in some situations suppress new input.
852
+
853
+ Disable Chrome-specific drag-selection workaround in non-Chrome browsers because it affected table cell selection in Safari.
854
+
855
+ ## 1.23.5 (2021-12-27)
856
+
857
+ ### Bug fixes
858
+
859
+ Use the `whitespace` node prop where appropriate.
860
+
861
+ ## 1.23.4 (2021-12-22)
862
+
863
+ ### Bug fixes
864
+
865
+ Improve the way the editor handles the mess of events produced when pressing Enter before a word that was just typed on Chrome + GBoard.
866
+
867
+ Fix an issue where compositions right before another instance of the composed text could cause the editor to crash.
868
+
869
+ Fix an issue where, if decorations changed during a pointer drag selection, the selection anchor might move around inappropriately.
870
+
871
+ ## 1.23.3 (2021-11-26)
872
+
873
+ ### Bug fixes
874
+
875
+ The clipboard parser will no longer drop trailing `<br>` nodes that appear in an inline parent element.
876
+
877
+ ## 1.23.2 (2021-11-19)
878
+
879
+ ### Bug fixes
880
+
881
+ Avoid some unnecessary node redraws when marks are present in sibling nodes.
882
+
883
+ ## 1.23.1 (2021-11-15)
884
+
885
+ ### Bug fixes
886
+
887
+ Restore accidentally reduced lookahead distance in view updating algorithm.
888
+
889
+ ## 1.23.0 (2021-11-11)
890
+
891
+ ### Bug fixes
892
+
893
+ When parsing clipboard content, ignore trailing BR nodes that look like they might be there as a contenteditable kludge.
894
+
895
+ ### New features
896
+
897
+ `EditorView` now exposes an `isDestroyed` property that can be used to test if the view has been destroyed.
898
+
899
+ ## 1.22.0 (2021-11-08)
900
+
901
+ ### Bug fixes
902
+
903
+ Fix an issue where some types of node decoration changes could cause an unnecessary cascade of node redraws.
904
+
905
+ ### New features
906
+
907
+ Widget decorations now accept a `destroy` option, which will be called when the widget is removed from the view.
908
+
909
+ ## 1.21.0 (2021-10-29)
910
+
911
+ ### Bug fixes
912
+
913
+ Fix issue where recent Mobile Safari versions weren't treated as Mac platforms.
914
+
915
+ ### New features
916
+
917
+ Multiple `style` properties provided through the `attributes` prop are now merged. Adjust mac detection for recent changes to navigator.platform on iOS
918
+
919
+ ## 1.20.3 (2021-10-13)
920
+
921
+ ### Bug fixes
922
+
923
+ Stop removing leading/trailing whitespace from pasted plain text.
924
+
925
+ Fix an issue that could cause invalid content to be produced when pasting HTML with isolating nodes in it.
926
+
927
+ ## 1.20.2 (2021-10-07)
928
+
929
+ ### Bug fixes
930
+
931
+ Fix a crash when pasting whitespace-only content as text.
932
+
933
+ ## 1.20.1 (2021-09-09)
934
+
935
+ ### Bug fixes
936
+
937
+ The library accidentally allowed node decorations on text nodes. It no longer does.
938
+
939
+ Fix an issue on Chrome and Safari where coordinates for positions between uneditable nodes and the end of a textblock would return zero-height rectangles.
940
+
941
+ Fix a bug where vertical `endOfTextblock` queries could inappropriately return true when a small line height is used.
942
+
943
+ ## 1.20.0 (2021-09-03)
944
+
945
+ ### New features
946
+
947
+ It is now possible to pass plugins directly to the view with the `plugins` direct prop.
948
+
949
+ ## 1.19.3 (2021-08-20)
950
+
951
+ ### Bug fixes
952
+
953
+ Fix an issue where generic styles for elements could cause separator nodes created by the editor to impact layout.
954
+
955
+ Fix an issue where moving to another tab and back could clear a node selection.
956
+
957
+ ## 1.19.2 (2021-08-19)
958
+
959
+ ### Bug fixes
960
+
961
+ Avoid some bugs around drag-selecting by delaying synchronization between the DOM and the state selection until the end of the drag.
962
+
963
+ ## 1.19.1 (2021-08-16)
964
+
965
+ ### Bug fixes
966
+
967
+ Fix another issue around copy-pasting table structure, causing inappropriate opening of copied cell selections.
968
+
969
+ ## 1.19.0 (2021-08-13)
970
+
971
+ ### Bug fixes
972
+
973
+ Add a DOM attribute to the content element to avoid automatic translation services from messing with the editable text.
974
+
975
+ Fix a bug where copy-pasting table content sometimes carried along superfluous table markup.
976
+
977
+ Fix issue where end-of-textblock detection didn't use the correct selection when in a shadow root.
978
+
979
+ ### New features
980
+
981
+ The `DecorationSource` interface now exposes a `map` method. Add a translate=no attribute to the editor element by default
982
+
983
+ ## 1.18.11 (2021-07-22)
984
+
985
+ ### Bug fixes
986
+
987
+ Work around an issue where Chrome and Safari will replace some spaces with non-breaking spaces when putting HTML on the clipboard.
988
+
989
+ When pasting as plain text (shift-mod-v) apply the marks at the selection to the inserted content.
990
+
991
+ Fix flaky behavior when starting a composition with a selection that spans multiple blocks.
992
+
993
+ ## 1.18.10 (2021-07-15)
994
+
995
+ ### Bug fixes
996
+
997
+ Fix an issue where dragging from just outside a draggable node on Chrome would cause odd dragging behavior.
998
+
999
+ ## 1.18.9 (2021-07-11)
1000
+
1001
+ ### Bug fixes
1002
+
1003
+ Fix a bug in the previous release where `handleClickOn` wasn't fired anymore for clicks with the middle or right mouse button.
1004
+
1005
+ ## 1.18.8 (2021-06-23)
1006
+
1007
+ ### Bug fixes
1008
+
1009
+ Work around a Safari bug where it draws the cursor at the start of the line when it is after an uneditable node at the end of the line.
1010
+
1011
+ Fix an issue where the DOM could get out of sync when editing decorated text.
1012
+
1013
+ Work around an issue where Firefox draws the cursor on the wrong line when after a newline.
1014
+
1015
+ Fix a bug where double-clicking with the left mouse button and then pressing another mouse button was treated as a triple click.
1016
+
1017
+ ## 1.18.7 (2021-05-20)
1018
+
1019
+ ### Bug fixes
1020
+
1021
+ Fix a bug where clicking on a textblock that had a node-selected parent didn't set a cursor selection.
1022
+
1023
+ Fix a bug that caused a workaround for a Chrome Android issue to not work correctly, leading to bad cursor placement after some types of text input.
1024
+
1025
+ ## 1.18.6 (2021-05-17)
1026
+
1027
+ ### Bug fixes
1028
+
1029
+ Fix a crash in mouse click handling introduced in the previous version.
1030
+
1031
+ ## 1.18.5 (2021-05-17)
1032
+
1033
+ ### Bug fixes
1034
+
1035
+ Work around a Firefox bug where backspace sometimes deletes the node after the cursor.
1036
+
1037
+ Fix a bug that prevented `transformPasted` hooks from being called on content dragged within the editor.
1038
+
1039
+ Fixes an issue where clicking near a node or other special selection on Chrome would in some cases do nothing.
1040
+
1041
+ ## 1.18.4 (2021-04-27)
1042
+
1043
+ ### Bug fixes
1044
+
1045
+ Fix incorrect drag cursor in Chrome on some platforms.
1046
+
1047
+ Fix an issue where a race condition could leave a node uneditable when clicked.
1048
+
1049
+ Fix scroll handling when the editor is placed through a DOM component slot.
1050
+
1051
+ Fix a typo in the Chrome backspace workaround.
1052
+
1053
+ Fixes an issue where, when mouseup events weren't being delivered, the editor could leak event handlers.
1054
+
1055
+ ## 1.18.3 (2021-04-13)
1056
+
1057
+ ### Bug fixes
1058
+
1059
+ Fix an issue where, when pressing enter or space at the start of a composition, the cursor would jump to the end of the composition on Chrome Android.
1060
+
1061
+ Fix an issue that would cause Enter presses to be dropped on Android when in a node whose DOM representation nested more than one element.
1062
+
1063
+ Fix a bug where pasting specific types of HTML could cause a crash.
1064
+
1065
+ ## 1.18.2 (2021-03-25)
1066
+
1067
+ ### Bug fixes
1068
+
1069
+ Properly handle CSS class name strings with extra spaces in decorations.
1070
+
1071
+ Fix a performance bug when updating nodes with thousands of children.
1072
+
1073
+ ## 1.18.1 (2021-03-15)
1074
+
1075
+ ### Bug fixes
1076
+
1077
+ Fix the scrolling-into-view logic in the case where a scale transformation is applied to the editor. Strip carriage return chars from text pasted as code
1078
+
1079
+ Remove carriage return characters when pasting text into code blocks.
1080
+
1081
+ ## 1.18.0 (2021-03-04)
1082
+
1083
+ ### Bug fixes
1084
+
1085
+ Fix a crash in `posAtDOM`.
1086
+
1087
+ ### New features
1088
+
1089
+ Node view constructors and `update` methods are now passed the inner decorations of the node.
1090
+
1091
+ ## 1.17.8 (2021-02-26)
1092
+
1093
+ ### Bug fixes
1094
+
1095
+ Fix an issue where some user actions (such as enter on iOS) in a node whose content DOM element isn't it's top element could leave the DOM in a damaged state.
1096
+
1097
+ ## 1.17.7 (2021-02-22)
1098
+
1099
+ ### Bug fixes
1100
+
1101
+ Fix an issue where the `ProseMirror-hideselection` element class would be briefly removed and then restored when moving from one invisible selection to another.
1102
+
1103
+ Fix an issue where the cursor could end up on the wrong side of a widget with `side` < 0.
1104
+
1105
+ ## 1.17.6 (2021-02-11)
1106
+
1107
+ ### Bug fixes
1108
+
1109
+ Fix an issue where using the vertical arrow keys after select-all didn't update the selection.
1110
+
1111
+ ## 1.17.5 (2021-02-05)
1112
+
1113
+ ### Bug fixes
1114
+
1115
+ Fix an issue where the view could go into an endless DOM flush loop in specific circumstances involving asynchronous DOM mutation.
1116
+
1117
+ ## 1.17.4 (2021-02-04)
1118
+
1119
+ ### Bug fixes
1120
+
1121
+ Add another kludge to work around an issue where Firefox displays the cursor in the wrong place in code blocks.
1122
+
1123
+ Fix a bug where validation of decorations passed to `DecorationSet.add` sometimes passed the wrong offsets to the validator.
1124
+
1125
+ Fix bad selection position in empty textblocks. Solves several issues with editing in Firefox Android.
1126
+
1127
+ ## 1.17.3 (2021-01-29)
1128
+
1129
+ ### Bug fixes
1130
+
1131
+ Fix a bug where adding invalid decorations (for example zero-length inline decorations) with `DecorationSet.add` would fail to drop those.
1132
+
1133
+ ## 1.17.2 (2021-01-12)
1134
+
1135
+ ### Bug fixes
1136
+
1137
+ The library will now always let the browser perform its native pasting behavior when the clipboard data is empty and no paste handler handles the event.
1138
+
1139
+ Fix a bug where `domAtPos` (and thus cursor placement) would pick positions inside uneditable DOM or atom nodes.
1140
+
1141
+ ## 1.17.1 (2021-01-08)
1142
+
1143
+ ### Bug fixes
1144
+
1145
+ Fix a regression in `coordsAtPos` when used on an empty line at the end of a code block.
1146
+
1147
+ ## 1.17.0 (2021-01-07)
1148
+
1149
+ ### Bug fixes
1150
+
1151
+ Fix an issue where starting a composition with stored marks would sometimes create the wrong steps (and thus break the mark) on Chrome.
1152
+
1153
+ ### New features
1154
+
1155
+ `EditorView.domAtPos` now takes a second parameter that can be used to control whether it should enter DOM nodes on the side of the given position.
1156
+
1157
+ ## 1.16.5 (2020-12-11)
1158
+
1159
+ ### Bug fixes
1160
+
1161
+ Fix platform detection on recent iPadOS versions, restoring several workarounds for bugs that were accidentally turned off there.
1162
+
1163
+ ## 1.16.4 (2020-12-02)
1164
+
1165
+ ### Bug fixes
1166
+
1167
+ Fix an issue where the cursor ended up in the wrong place when pressing enter in an empty heading on iOS.
1168
+
1169
+ ## 1.16.3 (2020-11-23)
1170
+
1171
+ ### Bug fixes
1172
+
1173
+ Fix an issue where pressing enter at the start of a line in a code block would leave the visible cursor in the wrong place on Firefox.
1174
+
1175
+ ## 1.16.2 (2020-11-18)
1176
+
1177
+ ### Bug fixes
1178
+
1179
+ Fix a bug where overlapping inline decorations would get drawn incorrectly (and even corrupt the drawing of unrelated content).
1180
+
1181
+ ## 1.16.1 (2020-10-26)
1182
+
1183
+ ### Bug fixes
1184
+
1185
+ Fix an issue where the attributes of defining nodes were dropped when copying to the clipboard.
1186
+
1187
+ ## 1.16.0 (2020-10-01)
1188
+
1189
+ ### Bug fixes
1190
+
1191
+ Fix an issue where a drag starting briefly after an aborted drag could confuse the view and break the second drag. Allow callers of coordsAtPos to specify a side
1192
+
1193
+ ### New features
1194
+
1195
+ `EditorView.coordsAtPos` now takes a `side` argument that determines which side of the position to look, if ambiguous.
1196
+
1197
+ ## 1.15.7 (2020-09-11)
1198
+
1199
+ ### Bug fixes
1200
+
1201
+ Fix an issue where, when inserting `<br>` nodes, Safari would briefly show the cursor before the inserted break, though the DOM selection had already been set after it.
1202
+
1203
+ When dragging inside the editor, whether the operation copies or moves is now determined by the modifiers held on drop, not on drag start.
1204
+
1205
+ ## 1.15.6 (2020-09-03)
1206
+
1207
+ ### Bug fixes
1208
+
1209
+ Fix issue where the DOM selection could end up in an invalid state after a keyboard cursor motion event that had no effect.
1210
+
1211
+ Fix an issue where some types of drop events would fail to select the dropped content.
1212
+
1213
+ Work around Safari issues when pressing shift-down with the cursor before an uneditable element.
1214
+
1215
+ ## 1.15.5 (2020-08-25)
1216
+
1217
+ ### Bug fixes
1218
+
1219
+ Fix an issue where mapping a decoration set could corrupt the decoration positions in specific cases.
1220
+
1221
+ ## 1.15.4 (2020-08-13)
1222
+
1223
+ ### Bug fixes
1224
+
1225
+ Fix a crash that occurred when inline decorations covered inline nodes that weren't leaf nodes.
1226
+
1227
+ ## 1.15.3 (2020-08-11)
1228
+
1229
+ ### Bug fixes
1230
+
1231
+ Work around a Firefox issue where the cursor is sometimes shown in the wrong place when directly after a `<br>` node.
1232
+
1233
+ The editor will now reset composition when stored marks are set on the state, so that the marks can be added to the next input.
1234
+
1235
+ Inline decorations are no longer applied to inline nodes that aren't leaves, only to the innermost layer.
1236
+
1237
+ ## 1.15.2 (2020-07-09)
1238
+
1239
+ ### Bug fixes
1240
+
1241
+ Adjust the workaround for Chrome's DOM selection corruption bug to cover more cases.
1242
+
1243
+ ## 1.15.1 (2020-07-09)
1244
+
1245
+ ### Bug fixes
1246
+
1247
+ Work around another issue where Chrome misreports the DOM selection.
1248
+
1249
+ ## 1.15.0 (2020-06-24)
1250
+
1251
+ ### Bug fixes
1252
+
1253
+ Fix an issue where Enter on iOS might be handled twice on slow devices. Pass plain text flag to transformPastedText and clipboardTextParser props
1254
+
1255
+ Fix a bug where typing in front of a mark could in some circumstances cause the editor to discard the new content.
1256
+
1257
+ ### New features
1258
+
1259
+ The `transformPastedText` and `clipboardTextParser` props now receive an extra argument, `plain`, indicating whether the paste was forced as plain text.
1260
+
1261
+ ## 1.14.13 (2020-06-05)
1262
+
1263
+ ### Bug fixes
1264
+
1265
+ Fix a bug where storing DOM nodes directly in widget decorations (not recommended) could cause the view to try and place the same DOM node multiple times.
1266
+
1267
+ ## 1.14.12 (2020-06-03)
1268
+
1269
+ ### Bug fixes
1270
+
1271
+ Fix a crash when the editor tries to read a DOM selection outside of itself.
1272
+
1273
+ Improve the way inline decorations covering non-leaf inline nodes are rendered. Ensure elt is defined before accessing it in posAtCoords
1274
+
1275
+ Fix a crash in Safari when the browser's `elementFromPoint` returns null in `posAtCoords`. Handle case where Chrome flips the nesting order of edited inline nodes
1276
+
1277
+ Fix the issue of `<a>` marks on decorated text being lost during editing because Chrome changes the nesting order of the link and the decoration `<span>` element in the DOM.
1278
+
1279
+ Fix an issue where, when pressing enter with a bolded virtual keyboard suggestion on Android's Gboard, the cursor would stay on the wrong line.
1280
+
1281
+ ## 1.14.11 (2020-05-19)
1282
+
1283
+ ### Bug fixes
1284
+
1285
+ Fix bug in the way the editor handles Cmd-arrow presses on macOS.
1286
+
1287
+ ## 1.14.10 (2020-05-18)
1288
+
1289
+ ### Bug fixes
1290
+
1291
+ Fix an issue where the editor would override behavior for Cmd-arrow key presses on macOS the wrong way in some situations.
1292
+
1293
+ Fix handling of copy and paste in IE when top-level elements can't be focused.
1294
+
1295
+ ## 1.14.9 (2020-05-06)
1296
+
1297
+ ### Bug fixes
1298
+
1299
+ Fix a crash on IE, which sets `document.activeElement` to null in some circumstances.
1300
+
1301
+ ## 1.14.8 (2020-05-01)
1302
+
1303
+ ### Bug fixes
1304
+
1305
+ Work around an issue in Safari where you couldn't click inside a selected element to put the cursor there.
1306
+
1307
+ Fix enter at start of paragraph in iOS inserting two new paragraphs.
1308
+
1309
+ Scrolling the cursor into view now makes sure it doesn't end up below a scrollbar.
1310
+
1311
+ ## 1.14.7 (2020-04-20)
1312
+
1313
+ ### Bug fixes
1314
+
1315
+ Fix a crash on Chrome during selection updates when `Selection.collapse` inexplicably leaves the selection empty. Update documented type for handlePaste event arg
1316
+
1317
+ Fix another issue that could break decoration set mapping in deeply nested nodes.
1318
+
1319
+ ## 1.14.6 (2020-03-25)
1320
+
1321
+ ### Bug fixes
1322
+
1323
+ Fix superfluous cursor showing up in Chrome when there is a gap cursor or similar custom empty selection active.
1324
+
1325
+ Fix an issue where `DecorationSet.remove` would ignore the positions of its argument decorations, and only compare by type.
1326
+
1327
+ ## 1.14.5 (2020-03-23)
1328
+
1329
+ ### Bug fixes
1330
+
1331
+ Work around Chrome Android issue where pasting would close the virtual keyboard.
1332
+
1333
+ Fix an issue where some kinds of changes would cause nodes to show up twice in the DOM.
1334
+
1335
+ ## 1.14.4 (2020-03-17)
1336
+
1337
+ ### Bug fixes
1338
+
1339
+ Improve return values from `coordsAtPos` on line breaks in Safari and Firefox.
1340
+
1341
+ Make sure enter on iOS is handled even when the native behavior has no effect.
1342
+
1343
+ ## 1.14.3 (2020-03-16)
1344
+
1345
+ ### Bug fixes
1346
+
1347
+ Fix mismatch between DOM and state selection bug at compositionend in IE11.
1348
+
1349
+ Make sure `handleDrop`](https://prosemirror.net/docs/ref/#view.EditorProps.handleDrop) is called even when there's nothing on the clipboard.
1350
+
1351
+ Fix a bug where reconfiguring a view in a way that changed both the active node views and the attributes of the top node left the old attributes active.
1352
+
1353
+ Work around another case where Chrome lies to the script about its current DOM selection state.
1354
+
1355
+ Avoid redrawing nodes when both their content and a widget in front of them is updated in the same transaction.
1356
+
1357
+ Fix issue where scrolling with multiple scrollable containers sometimes moves to the wrong position.
1358
+
1359
+ ## 1.14.2 (2020-02-10)
1360
+
1361
+ ### Bug fixes
1362
+
1363
+ Fix bug when starting a composition after a link, when the composition started with the character that ended the link.
1364
+
1365
+ ## 1.14.1 (2020-02-08)
1366
+
1367
+ ### Bug fixes
1368
+
1369
+ Fix issue where scrolling the cursor into view in a scrollable editor would sometimes inappropriately scroll an outer container as well.
1370
+
1371
+ ## 1.14.0 (2020-02-07)
1372
+
1373
+ ### Bug fixes
1374
+
1375
+ Fix parsing of `tbody`, `tfoot`, and `caption` elements in pasted HTML content. Fix bug in selection-is-at-edge check
1376
+
1377
+ Fix an issue where moving focus to the editor with the keyboard or the DOM `focus` method would leave the DOM and state selections inconsistent.
1378
+
1379
+ ### New features
1380
+
1381
+ Widget decorations can now take an `ignoreSelection` option, that causes the editor to leave selections inside them alone.
1382
+
1383
+ ## 1.13.11 (2020-01-31)
1384
+
1385
+ ### Bug fixes
1386
+
1387
+ Fix an issue that could lead to the editor making regular content uneditable on Safari.
1388
+
1389
+ ## 1.13.10 (2020-01-29)
1390
+
1391
+ ### Bug fixes
1392
+
1393
+ Fix a crash on Firefox when starting a composition after a marked non-text node.
1394
+
1395
+ ## 1.13.9 (2020-01-29)
1396
+
1397
+ ### Bug fixes
1398
+
1399
+ Make sure to reset the selection when the browser moves it into an uneditable node.
1400
+
1401
+ Fix issue where the editor would fail to create a meaningful DOM selection for a node selection on Safari.
1402
+
1403
+ Makes sure the iOS virtual keyboard gets its internal state (autocorrection, autocapitalization) updated when the user presses enter.
1404
+
1405
+ ## 1.13.8 (2020-01-24)
1406
+
1407
+ ### Bug fixes
1408
+
1409
+ Fix bug that would sometimes cause widget decorations to be drawn with marks from the node after the text node they were inside of.
1410
+
1411
+ ## 1.13.7 (2019-12-16)
1412
+
1413
+ ### Bug fixes
1414
+
1415
+ Fix a bug that caused the DOM to go out of sync with the decorations when updating inline decorations that added multiple wrapping nodes to a piece of content.
1416
+
1417
+ ## 1.13.6 (2019-12-13)
1418
+
1419
+ ### Bug fixes
1420
+
1421
+ Fix a crash when deleting a list item in Safari while using a parse rule with a `context` property for `<li>` elements.
1422
+
1423
+ Work around another case where Chrome reports an incorrect selection.
1424
+
1425
+ Work around issue where Firefox will insert a stray BR node when deleting a text node in some types of DOM structure.
1426
+
1427
+ ## 1.13.5 (2019-12-09)
1428
+
1429
+ ### Bug fixes
1430
+
1431
+ Fix the way decorations update node styles to allow removing CSS custom properties. Link to https in readme and changelog
1432
+
1433
+ The `root` accessor on views now makes sure that, when it returns a shadow root, that object has a `getSelection` method.
1434
+
1435
+ Fix an issue where the DOM selection could get out of sync with ProseMirror's selection state in Edge.
1436
+
1437
+ ## 1.13.4 (2019-11-20)
1438
+
1439
+ ### Bug fixes
1440
+
1441
+ Rename ES module files to use a .js extension, since Webpack gets confused by .mjs
1442
+
1443
+ ## 1.13.3 (2019-11-19)
1444
+
1445
+ ### Bug fixes
1446
+
1447
+ Fix issue where the editor wouldn't update its internal selection when the editor was blurred, its selection was changed programatically, and then the editor was re-focused with its old DOM selection.
1448
+
1449
+ The file referred to in the package's `module` field now is compiled down to ES5.
1450
+
1451
+ ## 1.13.2 (2019-11-14)
1452
+
1453
+ ### Bug fixes
1454
+
1455
+ Fix issue where `EditorView.focus` would scroll the top of the document into view on Safari.
1456
+
1457
+ ## 1.13.1 (2019-11-12)
1458
+
1459
+ ### Bug fixes
1460
+
1461
+ Work around selection jumping that sometimes occurs on Chrome when focusing the editor.
1462
+
1463
+ ## 1.13.0 (2019-11-08)
1464
+
1465
+ ### New features
1466
+
1467
+ Add a `module` field to package json file.
1468
+
1469
+ ## 1.12.3 (2019-11-07)
1470
+
1471
+ ### Bug fixes
1472
+
1473
+ Fix issue where paste events were stopped when the clipboard parser failed to make sense of the content.
1474
+
1475
+ Fix issue where the `handlePaste` prop might be called multiple times for a single paste.
1476
+
1477
+ ## 1.12.2 (2019-11-05)
1478
+
1479
+ ### Bug fixes
1480
+
1481
+ Set the editable element to use a `white-space: break-spaces` style so that whitespace at the end of a line properly moves the cursor to the next line.
1482
+
1483
+ Fix issue where `posAtCoords` could throw an error in some circumstances on Firefox.
1484
+
1485
+ Don't force focus back on the editor if a node view moves focus in its `setSelection` method.
1486
+
1487
+ ## 1.12.1 (2019-10-28)
1488
+
1489
+ ### Bug fixes
1490
+
1491
+ Reduce unnecessary redraws when typing creates a new text node on Chrome.
1492
+
1493
+ The default prosemirror.css now also turns off ligatures in Edge.
1494
+
1495
+ Fix issue where the cursor stays before the typed text in Edge, when typing in an empty paragraph or between hard break nodes.
1496
+
1497
+ ## 1.12.0 (2019-10-21)
1498
+
1499
+ ### New features
1500
+
1501
+ The mutation records passed to [`ignoreMutation`](https://prosemirror.net/docs/ref/#view.NodeView.ignoreMutation) now contain the old attribute value.
1502
+
1503
+ ## 1.11.7 (2019-10-15)
1504
+
1505
+ ### Bug fixes
1506
+
1507
+ Enabling a mark and then starting a composition, on Chrome Android, will no longer cause the cursor to jump to the start of the composition.
1508
+
1509
+ ## 1.11.6 (2019-10-07)
1510
+
1511
+ ### Bug fixes
1512
+
1513
+ Fix workaround for broken IE11 DOM change records when inserting between `<br>` nodes to handle more cases.
1514
+
1515
+ ## 1.11.5 (2019-10-04)
1516
+
1517
+ ### Bug fixes
1518
+
1519
+ Don't leave DOM selection in place when it is inside a node view but not inside its content DOM element.
1520
+
1521
+ ## 1.11.4 (2019-09-27)
1522
+
1523
+ ### Bug fixes
1524
+
1525
+ Fix an IE11 issue where marks would sometimes unexpectedly get dropped when inserting a space after marked text.
1526
+
1527
+ Fixes an issue where `handleTextInput` wasn't called when typing over a single character with the same character.
1528
+
1529
+ ## 1.11.3 (2019-09-20)
1530
+
1531
+ ### Bug fixes
1532
+
1533
+ Fix an issue where the DOM node representing a mark could be corrupted when the browser decides to replace it with another node but ProseMirror restored the old node after the change.
1534
+
1535
+ Handle another case where typing over a selection in IE11 confused the editor.
1536
+
1537
+ ## 1.11.2 (2019-09-17)
1538
+
1539
+ ### Bug fixes
1540
+
1541
+ Fix an issue where typing over a decorated piece of text would sometimes just act like deletion.
1542
+
1543
+ Fix another problem in IE11 with typing over content, where typing over a decorated bit of text caused a crash.
1544
+
1545
+ ## 1.11.1 (2019-09-16)
1546
+
1547
+ ### Bug fixes
1548
+
1549
+ Fix issue where typing over the entire contents of an inline node on IE11 would insert the typed content in the wrong position.
1550
+
1551
+ ## 1.11.0 (2019-09-16)
1552
+
1553
+ ### Bug fixes
1554
+
1555
+ Fix an issue where IE11 would select the entire textblock after deleting content at its start.
1556
+
1557
+ ### New features
1558
+
1559
+ View instances now have a public `editable` property that indicates whether they are in editable mode.
1560
+
1561
+ ## 1.10.3 (2019-09-04)
1562
+
1563
+ ### Bug fixes
1564
+
1565
+ Fix a regression in 1.10.2 that broke copying on IE11.
1566
+
1567
+ ## 1.10.2 (2019-09-03)
1568
+
1569
+ ### Bug fixes
1570
+
1571
+ Fix an issue where `posAtCoords` could crash by dereferencing undefined in some circumstances.
1572
+
1573
+ Fix inserting text next to a hard break in IE11.
1574
+
1575
+ Fix an issue where typing over a selection would result in two different transactions (once for the deletion, once for the insertion) on IE11.
1576
+
1577
+ Selecting the word at the start of the document and typing over it no longer causes the text input to appear at the end of the document in IE11.
1578
+
1579
+ ## 1.10.1 (2019-08-28)
1580
+
1581
+ ### Bug fixes
1582
+
1583
+ Copying content will no longer create elements in the main document, which prevents images from loading just because they appear in clipboard content.
1584
+
1585
+ ## 1.10.0 (2019-08-13)
1586
+
1587
+ ### Bug fixes
1588
+
1589
+ Fix an issue that caused the cursor to be scrolled into view when `focus()` was called on IE11.
1590
+
1591
+ Fix problem where the cursor cycled through pieces of right-to-left text on Firefox during horizontal motion when the gapcursor plugin was enabled.
1592
+
1593
+ Fix spurious mutation events in Firefox causing mark replacement at end of composition. Restore call to dom.focus on view.focus
1594
+
1595
+ Fix a bug that could cause node views in front of marked nodes to not be destroyed when deleted, and caused confusion in composition handling in some situations.
1596
+
1597
+ Cursor wrappers (a kludge to make sure typed text gets wrapping DOM structure corresponding to the current marks) are now created less eagerly, and in a less invasive way, which resolves a number of problems with composition (especially on Safari) and bidirectional text.
1598
+
1599
+ ### New features
1600
+
1601
+ Node views can now ignore selection change events through their [`ignoreMutation`](https://prosemirror.net/docs/ref/#view.NodeView.ignoreMutation) callback.
1602
+
1603
+ ## 1.9.13 (2019-07-29)
1604
+
1605
+ ### Bug fixes
1606
+
1607
+ Fix an issue where copying content from a ProseMirror instance into an instance using another schema could, in some circumstances, insert schema-violating content.
1608
+
1609
+ Fix comparison of decoration sets, which should solve unneccesary re-renders when updating decorations with an identical but newly allocated set. Don't update DOM selection in uneditable editors when the focus is elsewhere
1610
+
1611
+ Fix a bug where the editor would steal focus from child elements when in non-editable mode.
1612
+
1613
+ Fix error and corruption in IE11 when backspacing out a single character after a br node.
1614
+
1615
+ ## 1.9.12 (2019-07-16)
1616
+
1617
+ ### Bug fixes
1618
+
1619
+ Fix a crash `posAtCoords` in Firefox when the coordinates are above a text input field.
1620
+
1621
+ ## 1.9.11 (2019-07-03)
1622
+
1623
+ ### Bug fixes
1624
+
1625
+ Fix an issue where the DOM change handler would treat the parsed content as the wrong part of the document.
1626
+
1627
+ Fix an issue in IE11 where deleting the last character in a textblock causes a crash.
1628
+
1629
+ Fix an issue where backspacing out the first character in a textblock would cause IE11 to move the selection to some incorrect position.
1630
+
1631
+ ## 1.9.10 (2019-06-12)
1632
+
1633
+ ### Bug fixes
1634
+
1635
+ Fix a crash in `coordsAtPos` caused by use of an incorrect variable name.
1636
+
1637
+ ## 1.9.9 (2019-06-09)
1638
+
1639
+ ### Bug fixes
1640
+
1641
+ Fix arrowing over unselectable inline nodes in Chrome and Safari, which by default introduce an extra needless cursor position before the node.
1642
+
1643
+ Fix a bug that caused DOM changes to be ignored when happening directly in front of some types of DOM events (such as focus/blur).
1644
+
1645
+ ## 1.9.8 (2019-05-29)
1646
+
1647
+ ### Bug fixes
1648
+
1649
+ Fix an issue where moving focus from a node inside of the editor to the editor itself could sometimes lead to a node selection around the inner node rather than the intended selection (on Chrome).
1650
+
1651
+ ## 1.9.7 (2019-05-28)
1652
+
1653
+ ### Bug fixes
1654
+
1655
+ ProseMirror will no longer try to stabilize the scroll position during updates on browsers that support [scroll anchoring](https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-anchor), since it'd inadvertently cancel the browser's behavior.
1656
+
1657
+ Fix an issue in Safari where the editor would interrupt the composition spacebar menu because it incorrectly interpreted the mutation events fired by the browser as representing a replacement of the selection with identical text.
1658
+
1659
+ Work around an issue where, on Safari, an IME composition started in an empty textblock would vanish when you press enter.
1660
+
1661
+ ## 1.9.6 (2019-05-17)
1662
+
1663
+ ### Bug fixes
1664
+
1665
+ Fix bug in composition handling when the composition's parent node has an extra wrapper node around its content.
1666
+
1667
+ ## 1.9.5 (2019-05-14)
1668
+
1669
+ ### Bug fixes
1670
+
1671
+ Fix regression in handling text editing events on IE11.
1672
+
1673
+ ## 1.9.4 (2019-05-13)
1674
+
1675
+ ### Bug fixes
1676
+
1677
+ Fix a regression where all plugin views were recreated when calling [`setProps`](https://prosemirror.net/docs/ref/#view.EditorView.setProps).
1678
+
1679
+ ## 1.9.3 (2019-05-10)
1680
+
1681
+ ### Bug fixes
1682
+
1683
+ Fix a bug where, if the document was changed at exactly the right moment, `handleClickOn` could be called with `null` as the node.
1684
+
1685
+ ## 1.9.2 (2019-05-08)
1686
+
1687
+ ### Bug fixes
1688
+
1689
+ Fix a bug where updating to a reconfigured state would not recreate the view's plugin views.
1690
+
1691
+ ## 1.9.1 (2019-05-04)
1692
+
1693
+ ### Bug fixes
1694
+
1695
+ Fix a regression where mouse selection would sometimes raise an error.
1696
+
1697
+ ## 1.9.0 (2019-05-03)
1698
+
1699
+ ### New features
1700
+
1701
+ Changes made during compositions now immediately fire transactions on each update, rather than only a single one at the end of the composition.
1702
+
1703
+ The view now immediately shows changes to the document or decorations during composition, even if they come from transactions not directly generated by the use's editing. The only exception is decorations that affect the focused text node—those are still delayed to avoid unneccesarily canceling the composition.
1704
+
1705
+ ## 1.8.9 (2019-04-18)
1706
+
1707
+ ### Bug fixes
1708
+
1709
+ Improve display update times for nodes with thousands of children by fix an accidental piece of quadratic complexity.
1710
+
1711
+ Fixes an issue where changes to the [`nodeViews` prop](https://prosemirror.net/docs/ref/#view.EditorProps.nodeViews) weren't noticed when using [`updateState`](https://prosemirror.net/docs/ref/#view.EditorView.updateState) to update the view.
1712
+
1713
+ Fix issue where sometimes moving the selection back its last position with the mouse failed to update ProseMirror's selection state.
1714
+
1715
+ No longer call [`deselectNode`](https://prosemirror.net/docs/ref/#view.NodeView.deselectNode) on already-destroyed node views.
1716
+
1717
+ ## 1.8.8 (2019-04-11)
1718
+
1719
+ ### Bug fixes
1720
+
1721
+ Fix a regression from 1.8.4 that made it return unreasonable rectangles for positions between blocks.
1722
+
1723
+ ## 1.8.7 (2019-04-09)
1724
+
1725
+ ### Bug fixes
1726
+
1727
+ The [`handlePaste`](https://prosemirror.net/docs/ref/#view.EditorProps.handlePaste) prop is now activated even when the default parser can't make any sense of the clipboard content.
1728
+
1729
+ ## 1.8.6 (2019-04-08)
1730
+
1731
+ ### Bug fixes
1732
+
1733
+ Fix a bug where decorations splitting a text node would sometimes confuse the display updater and make decorated nodes disappear.
1734
+
1735
+ ## 1.8.5 (2019-04-08)
1736
+
1737
+ ### Bug fixes
1738
+
1739
+ Multiple [`transformPastedHTML`](https://prosemirror.net/docs/ref/#view.EditorProps.transformPastedHTML) props are now all properly called in order, rather than only the first one.
1740
+
1741
+ Fixes an issue where invalid change positions were computed when a composition happened concurrently with a change that inserted content at the same position.
1742
+
1743
+ ## 1.8.4 (2019-03-20)
1744
+
1745
+ ### Bug fixes
1746
+
1747
+ [`EditorView.coordsAtPos`](https://prosemirror.net/docs/ref/#view.EditorView.coordsAtPos) is now more accurate in right-to-left text on Chrome and Firefox.
1748
+
1749
+ [`EditorView.coordsAtPos`](https://prosemirror.net/docs/ref/#view.EditorView.coordsAtPos) returns more accurate coordinates when querying the position directly after a line wrap point.
1750
+
1751
+ Fix an issue where clicking directly in front of a node selection doesn't clear the node selection markup.
1752
+
1753
+ ## 1.8.3 (2019-03-04)
1754
+
1755
+ ### Bug fixes
1756
+
1757
+ Fix an issue where clicking when there's a non-text selection active sometimes doesn't cause the appropriate new selection.
1758
+
1759
+ ## 1.8.2 (2019-02-28)
1760
+
1761
+ ### Bug fixes
1762
+
1763
+ Fix an issue where a view state update happening between a change to the DOM selection and the corresponding browser event could disrupt mouse selection.
1764
+
1765
+ ## 1.8.1 (2019-02-22)
1766
+
1767
+ ### Bug fixes
1768
+
1769
+ Fix infinite loop in `coordsAtPos`.
1770
+
1771
+ ## 1.8.0 (2019-02-21)
1772
+
1773
+ ### Bug fixes
1774
+
1775
+ Fix a bug where [`endOfTextblock`](https://prosemirror.net/docs/ref/#view.EditorView.endOfTextblock) spuriously returns true when the cursor is in a mark.
1776
+
1777
+ ### New features
1778
+
1779
+ [`posAtCoords`](https://prosemirror.net/docs/ref/#view.EditorView.posAtCoords) will no longer return `null` when called with coordinates outside the browser's viewport. (It _will_ still return null for coordinates outside of the editor's bounding box.)
1780
+
1781
+ ## 1.7.3 (2019-02-20)
1782
+
1783
+ ### Bug fixes
1784
+
1785
+ [`endOfTextblock`](https://prosemirror.net/docs/ref/#view.EditorView.endOfTextblock) now works on textblocks that are the editor's top-level node.
1786
+
1787
+ ## 1.7.2 (2019-02-20)
1788
+
1789
+ ### Bug fixes
1790
+
1791
+ Pressing shift-left/right next to a selectable node no longer selects the node instead of creating a text selection across it.
1792
+
1793
+ ## 1.7.1 (2019-02-04)
1794
+
1795
+ ### Bug fixes
1796
+
1797
+ Fix an issue on Safari where an Enter key events that was part of a composition is interpreted as stand-alone Enter press.
1798
+
1799
+ ## 1.7.0 (2019-01-29)
1800
+
1801
+ ### Bug fixes
1802
+
1803
+ Fix an issue where node selections on uneditable nodes couldn't be copied or cut on Chrome.
1804
+
1805
+ ### New features
1806
+
1807
+ The editable view now recognizes the [`spanning`](https://prosemirror.net/docs/ref/#model.MarkSpec.spanning) mark property.
1808
+
1809
+ ## 1.6.8 (2019-01-03)
1810
+
1811
+ ### Bug fixes
1812
+
1813
+ When replacing a selection by typing over it with a letter that matches its start or end, the editor now generates a step that covers the whole replacement.
1814
+
1815
+ Fixes dragging a node when the mouse is in a child DOM element that doesn't represent a document node. Work around Chrome bug in selection management
1816
+
1817
+ Fixes an issue in Chrome where clicking at the start of a textblock after a selected node would sometimes not move the cursor there.
1818
+
1819
+ Fix issue where a node view's `getPos` callback could sometimes return `NaN`.
1820
+
1821
+ Fix an issue where deleting more than 5 nodes might cause the nodes after that to be needlessly redrawn.
1822
+
1823
+ ## 1.6.7 (2018-11-26)
1824
+
1825
+ ### Bug fixes
1826
+
1827
+ Avoids redrawing of content with marks when other content in front of it is deleted.
1828
+
1829
+ ## 1.6.6 (2018-11-15)
1830
+
1831
+ ### Bug fixes
1832
+
1833
+ Work around a Chrome bug where programmatic changes near the cursor sometimes cause the visible and reported selection to disagree.
1834
+
1835
+ Changing the `nodeView` prop will no longer leave outdated node views in the DOM.
1836
+
1837
+ Work around an issue where Chrome unfocuses the editor or scrolls way down when pressing down arrow with the cursor between the start of a textblock and an uneditable element.
1838
+
1839
+ Fix a bug where mapping decoration sets through changes that changed the structure of decorated subtrees sometimes produced corrupted output.
1840
+
1841
+ ## 1.6.5 (2018-10-29)
1842
+
1843
+ ### Bug fixes
1844
+
1845
+ Work around Safari issue where deleting the last bit of text in a table cell creates weird HTML with a BR in a table row.
1846
+
1847
+ ## 1.6.4 (2018-10-19)
1848
+
1849
+ ### Bug fixes
1850
+
1851
+ Fix pasting when both text and files are present on the clipboard.
1852
+
1853
+ ## 1.6.3 (2018-10-12)
1854
+
1855
+ ### Bug fixes
1856
+
1857
+ The editor will no longer try to handle file paste events with the old-browser compatibility kludge (which might cause scrolling and focus flickering).
1858
+
1859
+ ## 1.6.2 (2018-10-08)
1860
+
1861
+ ### Bug fixes
1862
+
1863
+ Fixes an issue where event handlers were leaked when destroying an editor
1864
+
1865
+ ## 1.6.1 (2018-10-01)
1866
+
1867
+ ### Bug fixes
1868
+
1869
+ Fixes situation where a vertical [`endOfTextblock`](https://prosemirror.net/docs/ref/#view.EditorView.endOfTextblock) query could get confused by nearby widgets or complex parent node representation.
1870
+
1871
+ ## 1.6.0 (2018-09-27)
1872
+
1873
+ ### Bug fixes
1874
+
1875
+ Fixes a corner case in which DecorationSet.map would map decorations to incorrect new positions.
1876
+
1877
+ When the editor contains scrollable elements, scrolling the cursor into view also scrolls those.
1878
+
1879
+ ### New features
1880
+
1881
+ The `scrollMargin` and `scrollThreshold` props may now hold `{left, right, top, bottom}` objects to set different margins and thresholds for different sides. Make scrolling from a given start node more robust
1882
+
1883
+ ## 1.5.3 (2018-09-24)
1884
+
1885
+ ### Bug fixes
1886
+
1887
+ The cursor is now scrolled into view after keyboard driven selection changes even when they were handled by the browser.
1888
+
1889
+ ## 1.5.2 (2018-09-07)
1890
+
1891
+ ### Bug fixes
1892
+
1893
+ Improves selection management around widgets with no actual HTML content (possibly drawn using CSS pseudo elements).
1894
+
1895
+ Fix extra whitespace in pasted HTML caused by previously-collapsed spacing.
1896
+
1897
+ Slow triple-clicks are no longer treated as two double-clicks in a row.
1898
+
1899
+ ## 1.5.1 (2018-08-24)
1900
+
1901
+ ### Bug fixes
1902
+
1903
+ Fix issue where some DOM selections would cause a non-editable view to crash when reading the selection.
1904
+
1905
+ ## 1.5.0 (2018-08-21)
1906
+
1907
+ ### New features
1908
+
1909
+ Mark views are now passed a boolean that indicates whether the mark's content is inline as third argument.
1910
+
1911
+ ## 1.4.4 (2018-08-13)
1912
+
1913
+ ### Bug fixes
1914
+
1915
+ Fix an issue where a non-empty DOM selection could stick around even though the state's selection is empty.
1916
+
1917
+ Fix an issue where Firefox would create an extra cursor position when arrow-keying through a widget.
1918
+
1919
+ ## 1.4.3 (2018-08-12)
1920
+
1921
+ ### Bug fixes
1922
+
1923
+ Fix an issue where the editor got stuck believing shift was down (and hence pasting as plain text) when it was unfocused with shift held down.
1924
+
1925
+ ## 1.4.2 (2018-08-03)
1926
+
1927
+ ### Bug fixes
1928
+
1929
+ Fix an issue where reading the selection from the DOM might crash in non-editable mode.
1930
+
1931
+ ## 1.4.1 (2018-08-02)
1932
+
1933
+ ### Bug fixes
1934
+
1935
+ Fixes an issue where backspacing out the last character between the start of a textblock and a widget in Chrome would insert a random hard break.
1936
+
1937
+ ## 1.4.0 (2018-07-26)
1938
+
1939
+ ### New features
1940
+
1941
+ The `dispatchTransaction` prop is now called with `this` bound to the editor view.
1942
+
1943
+ ## 1.3.8 (2018-07-24)
1944
+
1945
+ ### Bug fixes
1946
+
1947
+ Fix an issue where Chrome Android would move the cursor forward by one after backspace-joining two paragraphs.
1948
+
1949
+ ## 1.3.7 (2018-07-02)
1950
+
1951
+ ### Bug fixes
1952
+
1953
+ Fix a crash when scrolling things into view when the editor isn't a child of `document.body`.
1954
+
1955
+ ## 1.3.6 (2018-06-21)
1956
+
1957
+ ### Bug fixes
1958
+
1959
+ Make sure Safari version detection for clipboard support also works in iOS webview.
1960
+
1961
+ ## 1.3.5 (2018-06-20)
1962
+
1963
+ ### Bug fixes
1964
+
1965
+ Use shared implementation of [`dropPoint`](https://prosemirror.net/docs/ref/#transform.dropPoint) to handle finding a drop position.
1966
+
1967
+ ## 1.3.4 (2018-06-20)
1968
+
1969
+ ### Bug fixes
1970
+
1971
+ Enable use of browser clipboard API on Mobile Safari version 11 and up, which makes cut work on that platform and should generally improve clipboard handling.
1972
+
1973
+ ## 1.3.3 (2018-06-15)
1974
+
1975
+ ### Bug fixes
1976
+
1977
+ Fix arrow-left cursor motion from cursor wrapper (for example after a link).
1978
+
1979
+ Fix selection glitches when shift-selecting around widget decorations.
1980
+
1981
+ Fix issue where a parsing a code block from the editor DOM might drop newlines in the code.
1982
+
1983
+ ## 1.3.2 (2018-06-15)
1984
+
1985
+ ### Bug fixes
1986
+
1987
+ [`handleKeyDown`](https://prosemirror.net/docs/ref/#view.EditorProps.handleKeyDown) will now get notified of key events happening directly after a composition ends.
1988
+
1989
+ ## 1.3.1 (2018-06-08)
1990
+
1991
+ ### Bug fixes
1992
+
1993
+ The package can now be loaded in a web worker context (where `navigator` is defined but `document` isn't) without crashing.
1994
+
1995
+ Dropping something like a list item into a textblock will no longer split the textblock.
1996
+
1997
+ ## 1.3.0 (2018-04-24)
1998
+
1999
+ ### Bug fixes
2000
+
2001
+ Fix mouse-selecting (in IE and Edge) from the end of links and other positions that cause a cursor wrapper.
2002
+
2003
+ [Widget decorations](https://prosemirror.net/docs/ref/#view.Decoration^widget) with the same [key](https://prosemirror.net/docs/ref/#view.Decoration^widget^spec.key) are now considered equivalent, even if their other spec fields differ.
2004
+
2005
+ ### New features
2006
+
2007
+ The new [`EditorView.posAtDOM` method](https://prosemirror.net/docs/ref/#view.EditorView.posAtDOM) can be used to find the document position corresponding to a given DOM position.
2008
+
2009
+ The new [`EditorView.nodeDOM` method](https://prosemirror.net/docs/ref/#view.EditorView.nodeDOM) gives you the DOM node that is used to represent a specific node in the document.
2010
+
2011
+ [`Decoration.widget`](https://prosemirror.net/docs/ref/#view.Decoration^widget) now accepts a function as second argument, which can be used to delay rendering of the widget until the document is drawn (at which point a reference to the view is available).
2012
+
2013
+ The `getPos` function passed to a [node view constructor](https://prosemirror.net/docs/ref/#view.editorProps.nodeViews) can now be called immediately (it used to return undefined until rendering had finished).
2014
+
2015
+ The function used to render a [widget](https://prosemirror.net/docs/ref/#view.Decoration^widget) is now passed a `getPos` method that event handlers can use to figure out where in the DOM the widget is.
2016
+
2017
+ ## 1.2.0 (2018-03-14)
2018
+
2019
+ ### Bug fixes
2020
+
2021
+ Fix a problem where updating the state of a non-editable view would not set the selection, causing problems when the DOM was updated in a way that disrupted the DOM selection.
2022
+
2023
+ Fix an issue where, on IE and Chrome, starting a drag selection in a position that required a cursor wrapper (on a mark boundary) would sometimes fail to work.
2024
+
2025
+ Fix crash in key handling when the editor is focused but there is no DOM selection.
2026
+
2027
+ Fixes a bug that prevented decorations inside node views with a [`contentDOM` property](https://prosemirror.net/docs/ref/#view.NodeView.contentDOM) from being drawn.
2028
+
2029
+ Fixes an issue where, on Firefox, depending on a race condition, the skipping over insignificant DOM nodes done at keypress was canceled again before the keypress took effect.
2030
+
2031
+ Fixes an issue where an `:after` pseudo-element on a non-inclusive mark could block the cursor, making it impossible to arrow past it.
2032
+
2033
+ ### New features
2034
+
2035
+ The DOM structure for marks is no longer constrained to a single node. [Mark views](https://prosemirror.net/docs/ref/#view.NodeView) can have a `contentDOM` property, and [mark spec](https://prosemirror.net/docs/ref/#model.MarkSpec) `toDOM` methods can return structures with holes.
2036
+
2037
+ [Widget decorations](https://prosemirror.net/docs/ref/#view.Decoration^widget) are now wrapped in the marks of the node after them when their [`side` option](https://prosemirror.net/docs/ref/#view.Decoration^widget^spec.side) is >= 0.
2038
+
2039
+ [Widget decorations](https://prosemirror.net/docs/ref/#view.Decoration^widget) may now specify a [`marks` option](https://prosemirror.net/docs/ref/#view.Decoration^widget^spec.marks) to set the precise set of marks they should be wrapped in.
2040
+
2041
+ ## 1.1.1 (2018-03-01)
2042
+
2043
+ ### Bug fixes
2044
+
2045
+ Fixes typo that broke paste.
2046
+
2047
+ ## 1.1.0 (2018-02-28)
2048
+
2049
+ ### Bug fixes
2050
+
2051
+ Fixes issue where dragging a draggable node directly below a selected node would move the old selection rather than the target node.
2052
+
2053
+ A drop that can't fit the dropped content will no longer dispatch an empty transaction.
2054
+
2055
+ ### New features
2056
+
2057
+ Transactions generated for drop now have a `"uiEvent"` metadata field holding `"drop"`. Paste and cut transactions get that field set to `"paste"` or `"cut"`.
2058
+
2059
+ ## 1.0.11 (2018-02-16)
2060
+
2061
+ ### Bug fixes
2062
+
2063
+ Fix issue where the cursor was visible when a node was selected on recent Chrome versions.
2064
+
2065
+ ## 1.0.10 (2018-01-24)
2066
+
2067
+ ### Bug fixes
2068
+
2069
+ Improve preservation of open and closed nodes in slices taken from the clipboard.
2070
+
2071
+ ## 1.0.9 (2018-01-17)
2072
+
2073
+ ### Bug fixes
2074
+
2075
+ Work around a Chrome cursor motion bug by making sure <br> nodes don't get a contenteditable=false attribute.
2076
+
2077
+ ## 1.0.8 (2018-01-09)
2078
+
2079
+ ### Bug fixes
2080
+
2081
+ Fix issue where [`Decoration.map`](https://prosemirror.net/docs/ref/#view.DecorationSet.map) would in some situations with nested nodes incorrectly map decoration positions.
2082
+
2083
+ ## 1.0.7 (2018-01-05)
2084
+
2085
+ ### Bug fixes
2086
+
2087
+ Pasting from an external source no longer opens isolating nodes like table cells.
2088
+
2089
+ ## 1.0.6 (2017-12-26)
2090
+
2091
+ ### Bug fixes
2092
+
2093
+ [`DecorationSet.remove`](https://prosemirror.net/docs/ref/#view.DecorationSet.remove) now uses a proper deep compare to determine if widgets are the same (it used to compare by identity).
2094
+
2095
+ ## 1.0.5 (2017-12-05)
2096
+
2097
+ ### Bug fixes
2098
+
2099
+ Fix an issue where deeply nested decorations were mapped incorrectly in corner cases.
2100
+
2101
+ ## 1.0.4 (2017-11-27)
2102
+
2103
+ ### Bug fixes
2104
+
2105
+ Fix a corner-case crash during drop.
2106
+
2107
+ ## 1.0.3 (2017-11-23)
2108
+
2109
+ ### Bug fixes
2110
+
2111
+ Pressing backspace between two identical characters will no longer generate a transaction that deletes the second one.
2112
+
2113
+ ## 1.0.2 (2017-11-20)
2114
+
2115
+ ### Bug fixes
2116
+
2117
+ Fix test for whether a node can be selected when arrowing onto it from the right.
2118
+
2119
+ Calling [`posAtCoords`](https://prosemirror.net/docs/ref/#view.EditorView.posAtCoords) while a read from the DOM is pending will no longer return a malformed result.
2120
+
2121
+ ## 1.0.1 (2017-11-10)
2122
+
2123
+ ### Bug fixes
2124
+
2125
+ Deleting the last character in a list item no longer results in a spurious hard_break node on Safari.
2126
+
2127
+ Fixes a crash on IE11 when starting to drag.
2128
+
2129
+ ## 1.0.0 (2017-10-13)
2130
+
2131
+ ### Bug fixes
2132
+
2133
+ Dragging nodes with a node view that handles its own mouse events should work better now.
2134
+
2135
+ List item DOM nodes are no longer assigned `pointer-events: none` in the default style. Ctrl-clicking list markers now properly selects the list item again.
2136
+
2137
+ Arrow-down through an empty textblock no longer causes the browser to forget the cursor's horizontal position.
2138
+
2139
+ Copy-dragging on OS X is now done by holding option, rather than control, following the convention on that system.
2140
+
2141
+ Fixes a crash related to decoration management.
2142
+
2143
+ Fixes a problem where using cut on IE11 wouldn't actually remove the selected text.
2144
+
2145
+ Copy/paste on Edge 15 and up now uses the clipboard API, fixing a problem that made them fail entirely.
2146
+
2147
+ ### New features
2148
+
2149
+ The [`dragging`](https://prosemirror.net/docs/ref/#view.EditorView.dragging) property of a view, which contains information about editor content being dragged, is now part of the public interface.
2150
+
2151
+ ## 0.24.0 (2017-09-25)
2152
+
2153
+ ### New features
2154
+
2155
+ The [`clipboardTextParser`](https://prosemirror.net/docs/ref/version/0.24.0.html#view.EditorProps.clipboardTextParser) prop is now passed a context position.
2156
+
2157
+ ## 0.23.0 (2017-09-13)
2158
+
2159
+ ### Breaking changes
2160
+
2161
+ The `onFocus`, `onBlur`, and `handleContextMenu` props are no longer supported. You can achieve their effect with the [`handleDOMEvents`](https://prosemirror.net/docs/ref/version/0.23.0.html#view.EditorProps.handleDOMEvents) prop.
2162
+
2163
+ ### Bug fixes
2164
+
2165
+ Fixes occasional crash when reading the selection in Firefox.
2166
+
2167
+ Putting a table cell on the clipboard now properly wraps it in a table.
2168
+
2169
+ The view will no longer scroll into view when receiving a state that isn't derived from its previous state.
2170
+
2171
+ ### New features
2172
+
2173
+ Transactions caused by a paste now have their "paste" meta property set to true.
2174
+
2175
+ Adds a new view prop, [`handleScrollToSelection`](https://prosemirror.net/docs/ref/version/0.23.0.html#view.EditorProps.handleScrollToSelection) to override the behavior of scrolling the selection into view.
2176
+
2177
+ The new editor prop [`clipboardTextSerializer`](https://prosemirror.net/docs/ref/version/0.23.0.html#view.EditorProps.clipboardTextSerializer) allows you to override the way a piece of document is converted to clipboard text.
2178
+
2179
+ Adds the editor prop [`clipboardTextParser`](https://prosemirror.net/docs/ref/version/0.23.0.html#view.EditorProps.clipboardTextParser), which can be used to define your own parsing strategy for clipboard text content.
2180
+
2181
+ [`DecorationSet.find`](https://prosemirror.net/docs/ref/version/0.23.0.html#view.DecorationSet.find) now supports passing a predicate to filter decorations by spec.
2182
+
2183
+ ## 0.22.1 (2017-08-16)
2184
+
2185
+ ### Bug fixes
2186
+
2187
+ Invisible selections that don't cover any content (i.e., a cursor) are now properly hidden.
2188
+
2189
+ Initializing the editor view non-editable no longer causes a crash.
2190
+
2191
+ ## 0.22.0 (2017-06-29)
2192
+
2193
+ ### Bug fixes
2194
+
2195
+ Fix an issue where moving the cursor through a text widget causes the editor to lose the selection in Chrome.
2196
+
2197
+ Fixes an issue where down-arrow in front of a widget would sometimes not cause any cursor motion on Chrome.
2198
+
2199
+ [Destroying](https://prosemirror.net/docs/ref/version/0.22.0.html#view.EditorView.destroy) a [mounted](https://prosemirror.net/docs/ref/version/0.22.0.html#view.EditorView.constructor) editor view no longer leaks event handlers.
2200
+
2201
+ Display updates for regular, non-composition input are now synchronous, which should reduce flickering when, for example, updating decorations in response to typing.
2202
+
2203
+ ### New features
2204
+
2205
+ The editor can now be initialized in a document other than the global document (say, an `iframe`).
2206
+
2207
+ Editor views now have a [`domAtPos` method](https://prosemirror.net/docs/ref/version/0.22.0.html#view.EditorView.domAtPos), which gives you the DOM position corresponding to a given document position.
2208
+
2209
+ ## 0.21.1 (2017-05-09)
2210
+
2211
+ ### Bug fixes
2212
+
2213
+ Copying and pasting table cells on Edge no longer strips the table structure.
2214
+
2215
+ ## 0.21.0 (2017-05-03)
2216
+
2217
+ ### Breaking changes
2218
+
2219
+ The `associative` option to widget decorations is no longer supported. To make a widget left-associative, set its `side` option to a negative number. `associative` will continue to work with a warning until the next release.
2220
+
2221
+ ### New features
2222
+
2223
+ [Widget decorations](https://prosemirror.net/docs/ref/version/0.21.0.html#view.Decoration^widget) now support a `side` option that controls which side of them the cursor is drawn, where they move when content is inserted at their position, and the order in which they appear relative to other widgets at the same position.
2224
+
2225
+ ## 0.20.5 (2017-05-02)
2226
+
2227
+ ### Bug fixes
2228
+
2229
+ Fixes an issue where the DOM selection could be shown on the wrong side of hard break or image nodes.
2230
+
2231
+ ## 0.20.4 (2017-04-24)
2232
+
2233
+ ### Bug fixes
2234
+
2235
+ Fix a bug that prevented the DOM selection from being updated when the new position was near the old one in some circumstances.
2236
+
2237
+ Stop interfering with alt-d keypresses on OS X.
2238
+
2239
+ Fix issue where reading a DOM change in a previously empty node could crash.
2240
+
2241
+ Fixes crash when reading a change that removed a decorated text node from the DOM.
2242
+
2243
+ ## 0.20.3 (2017-04-12)
2244
+
2245
+ ### Bug fixes
2246
+
2247
+ Shift-pasting and pasting into a code block now does the right thing on IE and Edge.
2248
+
2249
+ ## 0.20.2 (2017-04-05)
2250
+
2251
+ ### Bug fixes
2252
+
2253
+ Fixes a bug that broke dragging from the editor.
2254
+
2255
+ ## 0.20.1 (2017-04-04)
2256
+
2257
+ ### Bug fixes
2258
+
2259
+ Typing in code blocks no longer replaces newlines with spaces.
2260
+
2261
+ Copy and paste on Internet Explorer, Edge, and mobile Safari should now behave more like it does on other browsers. Handlers are called, and the changes to the document are made by ProseMirror's code, not the browser.
2262
+
2263
+ Fixes a problem where triple-clicking the editor would sometimes cause the scroll position to inexplicably jump around on IE11.
2264
+
2265
+ ## 0.20.0 (2017-04-03)
2266
+
2267
+ ### Breaking changes
2268
+
2269
+ The `inclusiveLeft` and `inclusiveRight` options to inline decorations were renamed to [`inclusiveStart`](https://prosemirror.net/docs/ref/version/0.20.0.html#view.Decoration^inline^spec.inclusiveStart) and [`inclusiveEnd`](https://prosemirror.net/docs/ref/version/0.20.0.html#view.Decoration^inline^spec.inclusiveEnd) so that they also make sense in right-to-left text. The old names work with a warning until the next release.
2270
+
2271
+ The default styling for lists and blockquotes was removed from `prosemirror.css`. (They were moved to the [`example-setup`](https://code.haverbeke.berlin/prosemirror/prosemirror-example-setup) module.)
2272
+
2273
+ ### Bug fixes
2274
+
2275
+ Fixes reading of selection in Chrome in a shadow DOM.
2276
+
2277
+ Registering DOM event handlers that the editor doesn't listen to by default with the `handleDOMEvents` prop should work again.
2278
+
2279
+ Backspacing after turning off a mark now works again in Firefox.
2280
+
2281
+ ### New features
2282
+
2283
+ The new props [`handlePaste`](https://prosemirror.net/docs/ref/version/0.20.0.html#view.EditorProps.handlePaste) and [`handleDrop`](https://prosemirror.net/docs/ref/version/0.20.0.html#view.EditorProps.handleDrop) can be used to override drop and paste behavior.
2284
+
2285
+ ## 0.19.1 (2017-03-18)
2286
+
2287
+ ### Bug fixes
2288
+
2289
+ Fixes a number of issues with characters being duplicated or disappearing when typing on mark boundaries.
2290
+
2291
+ ## 0.19.0 (2017-03-16)
2292
+
2293
+ ### Breaking changes
2294
+
2295
+ [`endOfTextblock`](https://prosemirror.net/docs/ref/version/0.19.0.html#view.EditorView.endOfTextblock) no longer always returns false for horizontal motion on non-cursor selections, but checks the position of the selection head instead.
2296
+
2297
+ ### Bug fixes
2298
+
2299
+ Typing after adding/removing a mark no longer briefly shows the new text with the wrong marks.
2300
+
2301
+ [`posAtCoords`](https://prosemirror.net/docs/ref/version/0.19.0.html#view.EditorView.posAtCoords) is now more reliable on modern browsers by using browser APIs.
2302
+
2303
+ Fix a bug where the view would in some circumstances leave superfluous DOM nodes around inside marks.
2304
+
2305
+ ### New features
2306
+
2307
+ You can now override the selection the editor creates for a given DOM selection with the [`createSelectionBetween`](https://prosemirror.net/docs/ref/version/0.19.0.html#view.EditorProps.createSelectionBetween) prop.
2308
+
2309
+ ## 0.18.0 (2017-02-24)
2310
+
2311
+ ### Breaking changes
2312
+
2313
+ `Decoration` objects now store their definition object under [`spec`](https://prosemirror.net/docs/ref/version/0.18.0.html#Decoration.spec), not `options`. The old property name still works, with a warning, until the next release.
2314
+
2315
+ ### Bug fixes
2316
+
2317
+ Fix bug where calling [`focus`](https://prosemirror.net/docs/ref/version/0.18.0.html#view.EditorView.focus) when there was a text selection would sometimes result in `state.selection` receiving an incorrect value.
2318
+
2319
+ [`EditorView.props`](https://prosemirror.net/docs/ref/version/0.18.0.html#view.EditorView.props) now has its `state` property updated when you call `updateState`.
2320
+
2321
+ Putting decorations on or inside a node view with an `update` method now works.
2322
+
2323
+ ### New features
2324
+
2325
+ [Plugin view](https://prosemirror.net/docs/ref/version/0.18.0.html#state.PluginSpec.view) update methods are now passed the view's previous state as second argument.
2326
+
2327
+ The `place` agument to the [`EditorView` constructor](https://prosemirror.net/docs/ref/version/0.18.0.html#view.EditorView) can now be an object with a `mount` property to directly provide the node that should be made editable.
2328
+
2329
+ The new [`EditorView.setProps` method](https://prosemirror.net/docs/ref/version/0.18.0.html#view.EditorView.setProps) makes it easier to update individual props.
2330
+
2331
+ ## 0.17.7 (2017-02-08)
2332
+
2333
+ ### Bug fixes
2334
+
2335
+ Fixes crash in the code that maintains the scroll position when the document is empty or hidden.
2336
+
2337
+ ## 0.17.6 (2017-02-08)
2338
+
2339
+ ### Bug fixes
2340
+
2341
+ Transactions that shouldn't [scroll the selection into view](https://prosemirror.net/docs/ref/version/0.17.0.html#state.transaction.scrollIntoView) now no longer do so.
2342
+
2343
+ ## 0.17.4 (2017-02-02)
2344
+
2345
+ ### Bug fixes
2346
+
2347
+ Fixes bug where widget decorations would sometimes get parsed as content when editing near them.
2348
+
2349
+ The editor now prevents the behavior of Ctrl-d and Ctrl-h on textblock boundaries on OS X, as intended.
2350
+
2351
+ Make sure long words don't cause a horizontal scrollbar in Firefox
2352
+
2353
+ Various behavior fixes for IE11.
2354
+
2355
+ ## 0.17.3 (2017-01-19)
2356
+
2357
+ ### Bug fixes
2358
+
2359
+ DOM changes deleting a node's inner wrapping DOM element (for example the `<code>` tag in a schema-basic code block) no longer break the editor.
2360
+
2361
+ ## 0.17.2 (2017-01-16)
2362
+
2363
+ ### Bug fixes
2364
+
2365
+ Call custom click handlers before applying select-node behavior for a ctrl/cmd-click.
2366
+
2367
+ Fix failure to apply DOM changes that start at document position 0.
2368
+
2369
+ ## 0.17.1 (2017-01-07)
2370
+
2371
+ ### Bug fixes
2372
+
2373
+ Fix issue where a document update that left the selection in the same place sometimes led to an incorrect DOM selection.
2374
+
2375
+ Make sure [`EditorView.focus`](https://prosemirror.net/docs/ref/version/0.17.0.html#view.EditorView.focus) doesn't cause the browser to scroll the top of the editor into view.
2376
+
2377
+ ## 0.17.0 (2017-01-05)
2378
+
2379
+ ### Breaking changes
2380
+
2381
+ The `handleDOMEvent` prop has been dropped in favor of the [`handleDOMEvents`](https://prosemirror.net/docs/ref/version/0.17.0.html#view.EditorProps.handleDOMEvents) (plural) prop.
2382
+
2383
+ The `onChange` prop has been replaced by a [`dispatchTransaction`](https://prosemirror.net/docs/ref/version/0.17.0.html#view.EditorProps.dispatchTransaction) prop (which takes a transaction instead of an action).
2384
+
2385
+ ### New features
2386
+
2387
+ Added support for a [`handleDOMEvents` prop](https://prosemirror.net/docs/ref/version/0.17.0.html#view.EditorProps.handleDOMEvents), which allows you to provide handler functions per DOM event, and works even for events that the editor doesn't normally add a handler for.
2388
+
2389
+ Add view method [`dispatch`](https://prosemirror.net/docs/ref/version/0.17.0.html#view.EditorView.dispatch), which provides a convenient way to dispatch transactions.
2390
+
2391
+ The [`dispatchTransaction`](https://prosemirror.net/docs/ref/version/0.17.0.html#view.EditorProps.dispatchTransaction) (used to be `onAction`) prop is now optional, and will default to simply applying the transaction to the current view state.
2392
+
2393
+ [Widget decorations](https://prosemirror.net/docs/ref/version/0.17.0.html#view.Decoration.widget) now accept an option `associative` which can be used to configure on which side of content inserted at their position they end up.
2394
+
2395
+ Typing immediately after deleting text now preserves the marks of the deleted text.
2396
+
2397
+ Transactions that update the selection because of mouse or touch input now get a metadata property `pointer` with the value `true`.
2398
+
2399
+ ## 0.16.0 (2016-12-23)
2400
+
2401
+ ### Breaking changes
2402
+
2403
+ The `spellcheck`, `label`, and `class` props are now replaced by an [`attributes` prop](https://prosemirror.net/docs/ref/version/0.16.0.html#view.EditorProps.attributes).
2404
+
2405
+ ### Bug fixes
2406
+
2407
+ Solve problem where setting a node selection would trigger a DOM read, leading to the selection being reset.
2408
+
2409
+ Ignoring/aborting an action should no longer lead to the DOM being stuck in an outdated state.
2410
+
2411
+ Typing at the end of a textblock which ends in a non-text node now actually works.
2412
+
2413
+ DOM nodes for leaf document nodes are now set as non-editable to prevent various issues such as stray cursors inside of them and Firefox adding image resize controls.
2414
+
2415
+ Inserting a node no longer causes nodes of the same type after it to be neednessly redrawn.
2416
+
2417
+ ### New features
2418
+
2419
+ Add a new editor prop [`editable`](https://prosemirror.net/docs/ref/version/0.16.0.html#view.EditorProps.editable) which controls whether the editor's `contentEditable` behavior is enabled.
2420
+
2421
+ Plugins and props can now set any DOM attribute on the outer editor node using the [`attributes` prop](https://prosemirror.net/docs/ref/version/0.16.0.html#view.EditorProps.attributes).
2422
+
2423
+ Node view constructors and update methods now have access to the node's wrapping decorations, which can be used to pass information to a node view without encoding it in the document.
2424
+
2425
+ Attributes added or removed by node and inline [decorations](https://prosemirror.net/docs/ref/version/0.16.0.html#view.Decoration) no longer cause the nodes inside of them to be fully redrawn, making node views more stable and allowing CSS transitions to be used.
2426
+
2427
+ ## 0.15.2 (2016-12-10)
2428
+
2429
+ ### Bug fixes
2430
+
2431
+ The native selection is now appropriately hidden when there is a node selection.
2432
+
2433
+ ## 0.15.1 (2016-12-10)
2434
+
2435
+ ### Bug fixes
2436
+
2437
+ Fix DOM parsing for decorated text nodes.
2438
+
2439
+ ## 0.15.0 (2016-12-10)
2440
+
2441
+ ### Breaking changes
2442
+
2443
+ The editor view no longer wraps its editable DOM element in a wrapper element. The `ProseMirror` CSS class now applies directly to the editable element. The `ProseMirror-content` CSS class is still present for ease of upgrading but will be dropped in the next release.
2444
+
2445
+ The editor view no longer draws a drop cursor when dragging content over the editor. The new [`prosemirror-dropcursor`](https://code.haverbeke.berlin/prosemirror/prosemirror-dropcursor) module implements this as a plugin.
2446
+
2447
+ ### Bug fixes
2448
+
2449
+ Simple typing and backspacing now gets handled by the browser without ProseMirror redrawing the touched nodes, making spell-checking and various platform-specific input tricks (long-press on OS X, double space on iOS) work in the editor.
2450
+
2451
+ Improve tracking of DOM nodes that have been touched by user changes, so that [`updateState`](https://prosemirror.net/docs/ref/version/0.15.0.html#view.EditorView.updateState) can reliably fix them.
2452
+
2453
+ Changes to the document that happen while dragging editor content no longer break moving of the content.
2454
+
2455
+ Adding or removing a mark directly in the DOM (for example with the bold/italic buttons in iOS' context menu) now produces mark steps, rather than replace steps.
2456
+
2457
+ Pressing backspace at the start of a paragraph on Android now allows key handlers for backspace to fire.
2458
+
2459
+ Toggling a mark when there is no selection now works better on mobile platforms.
2460
+
2461
+ ### New features
2462
+
2463
+ Introduces an [`endOfTextblock`](https://prosemirror.net/docs/ref/version/0.15.0.html#view.EditorView.endOfTextblock) method on views, which can be used to find out in a bidi- and layout-aware way whether the selection is on the edge of a textblock.
2464
+
2465
+ ## 0.14.4 (2016-12-02)
2466
+
2467
+ ### Bug fixes
2468
+
2469
+ Fix issue where node decorations would stick around in the DOM after the decoration was removed.
2470
+
2471
+ Setting or removing a node selection in an unfocused editor now properly updates the DOM to show that selection.
2472
+
2473
+ ## 0.14.2 (2016-11-30)
2474
+
2475
+ ### Bug fixes
2476
+
2477
+ FIX: Avoid unneeded selection resets which sometimes confused browsers.
2478
+
2479
+ ## 0.14.2 (2016-11-29)
2480
+
2481
+ ### Bug fixes
2482
+
2483
+ Fix a bug where inverted selections weren't created in the DOM correctly.
2484
+
2485
+ ## 0.14.1 (2016-11-29)
2486
+
2487
+ ### Bug fixes
2488
+
2489
+ Restores previously broken kludge that allows the cursor to appear after non-text content at the end of a line.
2490
+
2491
+ ## 0.14.0 (2016-11-28)
2492
+
2493
+ ### Breaking changes
2494
+
2495
+ Wrapping decorations are now created using the [`nodeName`](https://prosemirror.net/docs/ref/version/0.14.0.html#view.DecorationAttrs.nodeName) property. The `wrapper` property is no longer supported.
2496
+
2497
+ The `onUnmountDOM` prop is no longer supported (use a node view with a [`destroy`](https://prosemirror.net/docs/ref/version/0.14.0.html#view.NodeView.destroy) method instead).
2498
+
2499
+ The `domSerializer` prop is no longer supported. Use [node views](https://prosemirror.net/docs/ref/version/0.14.0.html#view.EditorProps.nodeViews) to configure editor-specific node representations.
2500
+
2501
+ ### New features
2502
+
2503
+ Widget decorations can now be given a [`key`](https://prosemirror.net/docs/ref/version/0.14.0.html#view.Decoration.widget^options.key) property to prevent unneccesary redraws.
2504
+
2505
+ The `EditorView` class now has a [`destroy`](https://prosemirror.net/docs/ref/version/0.14.0.html#view.EditorView.destroy) method for cleaning up.
2506
+
2507
+ The [`handleClickOn`](https://prosemirror.net/docs/ref/version/0.14.0.html#view.EditorProps.handleClickOn) prop and friends now receive a `direct` boolean argument that indicates whether the node was clicked directly.
2508
+
2509
+ [Widget decorations](https://prosemirror.net/docs/ref/version/0.14.0.html#view.Decoration^widget) now support a `stopEvent` option that can be used to control which DOM events that pass through them should be ignored by the editor view.
2510
+
2511
+ You can now [specify](https://prosemirror.net/docs/ref/version/0.14.0.html#view.EditorProps.nodeViews) custom [node views](https://prosemirror.net/docs/ref/version/0.14.0.html#view.NodeView) for an editor view, which give you control over the way node of a given type are represented in the DOM. See the related [RFC](https://discuss.prosemirror.net/t/rfc-node-views-to-manage-the-representation-of-nodes/463).
2512
+
2513
+ ## 0.13.2 (2016-11-15)
2514
+
2515
+ ### Bug fixes
2516
+
2517
+ Fixes an issue where widget decorations in the middle of text nodes would sometimes disappear.
2518
+
2519
+ ## 0.13.1 (2016-11-15)
2520
+
2521
+ ### Bug fixes
2522
+
2523
+ Fixes event handler crash (and subsequent bad default behavior) when pasting some types of external HTML into an editor.
2524
+
2525
+ ## 0.13.0 (2016-11-11)
2526
+
2527
+ ### Breaking changes
2528
+
2529
+ Selecting nodes on OS X is now done with cmd-leftclick rather than ctrl-leftclick.
2530
+
2531
+ ### Bug fixes
2532
+
2533
+ Pasting text into a code block will now insert the raw text.
2534
+
2535
+ Widget decorations at the start or end of a textblock no longer block horizontal cursor motion through them.
2536
+
2537
+ Widget nodes at the end of textblocks are now reliably drawn during display updates.
2538
+
2539
+ ### New features
2540
+
2541
+ [`DecorationSet.map`](https://prosemirror.net/docs/ref/version/0.13.0.html#view.DecorationSet.map) now takes an options object which allows you to specify an `onRemove` callback to be notified when remapping drops decorations.
2542
+
2543
+ The [`transformPastedHTML`](https://prosemirror.net/docs/ref/version/0.13.0.html#view.EditorProps.transformPastedHTML) and [`transformPastedText`](https://prosemirror.net/docs/ref/version/0.13.0.html#view.EditorProps.transformPastedText) props were (re-)added, and can be used to clean up pasted content.
2544
+
2545
+ ## 0.12.2 (2016-11-02)
2546
+
2547
+ ### Bug fixes
2548
+
2549
+ Inline decorations that span across an empty textblock no longer crash the display drawing code.
2550
+
2551
+ ## 0.12.1 (2016-11-01)
2552
+
2553
+ ### Bug fixes
2554
+
2555
+ Use a separate document to parse pasted HTML to better protect
2556
+ against cross-site scripting attacks.
2557
+
2558
+ Specifying multiple classes in a decoration now actually works.
2559
+
2560
+ Ignore empty inline decorations when building a decoration set.
2561
+
2562
+ ## 0.12.0 (2016-10-21)
2563
+
2564
+ ### Breaking changes
2565
+
2566
+ The return value of
2567
+ [`EditorView.posAtCoords`](https://prosemirror.net/docs/ref/version/0.12.0.html#view.EditorView.posAtCoords) changed to
2568
+ contain an `inside` property pointing at the innermost node that the
2569
+ coordinates are inside of. (Note that the docs for this method were
2570
+ wrong in the previous release.)
2571
+
2572
+ ### Bug fixes
2573
+
2574
+ Reduce reliance on shift-state tracking to minimize damage when
2575
+ it gets out of sync.
2576
+
2577
+ Fix bug that'd produce bogus document positions for DOM positions
2578
+ inside non-document nodes.
2579
+
2580
+ Don't treat fast ctrl-clicks as double or triple clicks.
2581
+
2582
+ ### New features
2583
+
2584
+ Implement [decorations](https://prosemirror.net/docs/ref/version/0.12.0.html#view.Decoration), a way to
2585
+ influence the way the document is drawn. Add the [`decorations`
2586
+ prop](https://prosemirror.net/docs/ref/version/0.12.0.html#view.EditorProps.decorations) to specify them.
2587
+
2588
+ ## 0.11.2 (2016-10-04)
2589
+
2590
+ ### Bug fixes
2591
+
2592
+ Pass actual event object to [`handleDOMEvent`](https://prosemirror.net/docs/ref/version/0.11.0.html#view.EditorProps.handleDOMEvent), rather than just its name.
2593
+
2594
+ Fix display corruption caused by using the wrong state as previous version during IME.
2595
+
2596
+ ## 0.11.0 (2016-09-21)
2597
+
2598
+ ### Breaking changes
2599
+
2600
+ Moved into a separate module from the old `edit` submodule. Completely
2601
+ new approach to managing the editor's DOM representation and input.
2602
+
2603
+ Event handlers and options are now replaced by
2604
+ [props](https://prosemirror.net/docs/ref/version/0.11.0.html#view.EditorProps). The view's state is now 'shallow',
2605
+ represented entirely by a set of props, one of which holds an editor
2606
+ state value from the [state](https://prosemirror.net/docs/ref/version/0.11.0.html#state) module.
2607
+
2608
+ When the user interacts with the editor, it will pass an
2609
+ [action](https://prosemirror.net/docs/ref/version/0.11.0.html#state.Action) to its
2610
+ [`onAction`](https://prosemirror.net/docs/ref/version/0.11.0.html#view.EditorProps.onAction) prop, which is responsible
2611
+ for triggering an view update.
2612
+
2613
+ The `markRange` system was dropped, to be replaced in the next release
2614
+ by a 'decoration' system.
2615
+
2616
+ There is no keymap support in the view module anymore. Use a
2617
+ [keymap](https://prosemirror.net/docs/ref/version/0.11.0.html#keymap) plugin for that.
2618
+
2619
+ The undo [history](https://prosemirror.net/docs/ref/version/0.11.0.html#history) is now a separate plugin.
2620
+
2621
+ CSS needed by the editor is no longer injected implicitly into the
2622
+ page. Instead, you should arrange for the `style/prosemirror.css` file
2623
+ to be loaded into your page.
2624
+
2625
+ ### New features
2626
+
2627
+ The DOM [parser](https://prosemirror.net/docs/ref/version/0.11.0.html#model.DOMParser) and
2628
+ [serializer](https://prosemirror.net/docs/ref/version/0.11.0.html#model.DOMSerializer) used to interact with the visible
2629
+ DOM and the clipboard can now be customized through
2630
+ [props](https://prosemirror.net/docs/ref/version/0.11.0.html#view.EditorProps).
2631
+
2632
+ You can now provide a catch-all DOM
2633
+ [event handler](https://prosemirror.net/docs/ref/version/0.11.0.html#view.EditorProps.handleDOMEvent) to get a first
2634
+ chance at handling DOM events.
2635
+
2636
+ The [`onUnmountDOM`](https://prosemirror.net/docs/ref/version/0.11.0.html#view.EditorProps.onUnmountDOM) can be used to
2637
+ be notified when a piece of the document DOM is thrown away (in case
2638
+ cleanup is needed).
2639
+