diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2019-05-09 00:01:47 -0400 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2019-05-09 00:01:47 -0400 |
commit | fc21d178bd636229ba8338c3f3f9c12cc267a8d3 (patch) | |
tree | cdaf117a2a752dbddfa0a418585ea608c61c84c3 /src/client/util/RichTextSchema.tsx | |
parent | 59c52553a942d327b3cdf7377eb85f4b0b19c2dd (diff) |
keep image selected on pointer up.
Diffstat (limited to 'src/client/util/RichTextSchema.tsx')
-rw-r--r-- | src/client/util/RichTextSchema.tsx | 4 |
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) |