mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-02-24 04:00:59 +01:00
editor: fix image size resetting on opening new tab
This commit is contained in:
@@ -61,7 +61,10 @@ export function ImageComponent(
|
||||
threshold: 0.2,
|
||||
once: true
|
||||
});
|
||||
const size = clampSize(node.attrs, editor.view.dom.clientWidth, aspectRatio);
|
||||
const size =
|
||||
editor.view.dom.clientWidth === 0
|
||||
? node.attrs
|
||||
: clampSize(node.attrs, editor.view.dom.clientWidth, aspectRatio);
|
||||
|
||||
const float = isMobile ? false : node.attrs.float;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user