diff options
-rw-r--r-- | src/client/views/PreviewCursor.tsx | 4 | ||||
-rw-r--r-- | src/client/views/nodes/ImageBox.tsx | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/client/views/PreviewCursor.tsx b/src/client/views/PreviewCursor.tsx index 7e597879d..eb4e75f74 100644 --- a/src/client/views/PreviewCursor.tsx +++ b/src/client/views/PreviewCursor.tsx @@ -46,8 +46,6 @@ export class PreviewCursor extends ObservableReactComponent<object> { this.Visible = false; }); - // tests for URL and makes web document - const re = /^https?:\/\//g; const plain = e.clipboardData.getData('text/plain'); if (plain && newPoint) { // tests for youtube and makes video document @@ -62,7 +60,7 @@ export class PreviewCursor extends ObservableReactComponent<object> { y: newPoint[1], }; this._slowLoadDocuments?.(plain.split('v=')[1].split('&')[0], options, generatedDocuments, '', undefined, this._addDocument ?? returnFalse).then(batch.end); - } else if (re.test(plain)) { + } else if ((/^https?:\/\//g).test(plain)) { // tests for URL and makes web document const url = plain; if (!url.startsWith(window.location.href)) { undoable( diff --git a/src/client/views/nodes/ImageBox.tsx b/src/client/views/nodes/ImageBox.tsx index caefbf542..697577955 100644 --- a/src/client/views/nodes/ImageBox.tsx +++ b/src/client/views/nodes/ImageBox.tsx @@ -147,7 +147,7 @@ export class ImageBox extends ViewBoxAnnotatableComponent<FieldViewProps>() { this._disposers.path = reaction( () => ({ nativeSize: this.nativeSize, width: NumCast(this.layoutDoc._width) }), ({ nativeSize, width }) => { - if (layoutDoc === this.layoutDoc || !this.layoutDoc._height) { + if ((layoutDoc === this.layoutDoc || !this.layoutDoc._height) && !this.layoutDoc._layout_nativeDimEditable) { this.layoutDoc._height = (width * nativeSize.nativeHeight) / nativeSize.nativeWidth; } }, |