fix: Firefox swallows mouse up when dragging to resize video

This commit is contained in:
Tom Moor
2023-12-13 19:40:51 -05:00
parent 7dbdfcc823
commit ac75521c6c
2 changed files with 5 additions and 4 deletions

View File

@@ -44,7 +44,7 @@ const Image = (props: Props) => {
maxWidth,
naturalWidth,
naturalHeight,
gridWidth: documentBounds.width / 10,
gridWidth: documentBounds.width / 20,
onChangeSize,
}
);

View File

@@ -27,7 +27,7 @@ export default function Video(props: Props) {
maxWidth: documentBounds.width,
naturalWidth,
naturalHeight,
gridWidth: documentBounds.width / 10,
gridWidth: documentBounds.width / 20,
onChangeSize,
}
);
@@ -41,9 +41,10 @@ export default function Video(props: Props) {
}
}, [node.attrs.width]);
const style = {
const style: React.CSSProperties = {
width: width || "auto",
maxHeight: height || "auto",
pointerEvents: dragging ? "none" : "all",
};
return (
@@ -56,7 +57,7 @@ export default function Video(props: Props) {
src={sanitizeUrl(node.attrs.src)}
title={node.attrs.title}
style={style}
controls
controls={!dragging}
/>
{isEditable && isResizable && (
<>