aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/util/RichTextSchema.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/util/RichTextSchema.tsx b/src/client/util/RichTextSchema.tsx
index c036bfe97..c0e6f7899 100644
--- a/src/client/util/RichTextSchema.tsx
+++ b/src/client/util/RichTextSchema.tsx
@@ -368,6 +368,7 @@ export class ImageResizeView {
let self = this;
this._handle.onpointerdown = function (e: any) {
e.preventDefault();
+ e.stopPropagation();
const startX = e.pageX;
const startWidth = parseFloat(node.attrs.width);
const onpointermove = (e: any) => {
@@ -381,7 +382,8 @@ export class ImageResizeView {
document.removeEventListener("pointerup", onpointerup);
view.dispatch(
view.state.tr.setNodeMarkup(getPos(), null,
- { src: node.attrs.src, width: self._outer.style.width }));
+ { src: node.attrs.src, width: self._outer.style.width })
+ .setSelection(view.state.selection));
}
document.addEventListener("pointermove", onpointermove)