fix: Firefox swallows mouse up when dragging to resize video
This commit is contained in:
@@ -44,7 +44,7 @@ const Image = (props: Props) => {
|
||||
maxWidth,
|
||||
naturalWidth,
|
||||
naturalHeight,
|
||||
gridWidth: documentBounds.width / 10,
|
||||
gridWidth: documentBounds.width / 20,
|
||||
onChangeSize,
|
||||
}
|
||||
);
|
||||
|
||||
@@ -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 && (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user