@flozy/editor 4.4.3 → 4.4.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -53,7 +53,8 @@ const VideoContent = props => {
53
53
  ...videoSX
54
54
  },
55
55
  src: embedURL,
56
- title: alt
56
+ title: alt,
57
+ allowFullScreen: true
57
58
  });
58
59
  };
59
60
  const VideoPlaceholder = props => {
@@ -299,7 +299,7 @@ const RnD = props => {
299
299
  width,
300
300
  height
301
301
  },
302
- isDragging: true,
302
+ isDragging: 1,
303
303
  parentPath: getParentSectionPath({
304
304
  ref
305
305
  }, ".freegrid-container-parent")
@@ -311,6 +311,7 @@ const RnD = props => {
311
311
  };
312
312
  const onDrag = (e, d) => {
313
313
  e.preventDefault();
314
+ e.stopPropagation();
314
315
  const lines = getClosestDraggable(e.clientX, e.clientY, `.freegrid-section_${parentSectionPath} .freegrid-container .freegrid-item.inactive-drag`.replace(/\|/g, "\\|"), ".freegrid-item.active-drag:not(.exclude-virtual)");
315
316
  console.log(lines);
316
317
  setAbsPosition({
@@ -318,7 +319,7 @@ const RnD = props => {
318
319
  "--zIndex": 2000
319
320
  });
320
321
  updateDragging({
321
- isDragging: true,
322
+ isDragging: 2,
322
323
  position: {
323
324
  ...dragging.position,
324
325
  x: e.clientX,
@@ -336,7 +337,7 @@ const RnD = props => {
336
337
  const onDragStop = (e, d) => {
337
338
  e.preventDefault();
338
339
  e.stopPropagation();
339
- if (dragging?.isDragging && dragging?.position?.strXY) {
340
+ if (dragging?.isDragging === 2 && dragging?.position?.strXY) {
340
341
  d.x = e.x;
341
342
  d.y = e.y;
342
343
  d.offsetX = e.offsetX;
@@ -369,6 +370,17 @@ const RnD = props => {
369
370
  setAbsPosition({
370
371
  ...ud
371
372
  });
373
+ } else {
374
+ // invalid drags
375
+ // found in dev mode and in safari browser
376
+ updateDragging({
377
+ isDragging: 0,
378
+ position: {},
379
+ lines: [],
380
+ active: false,
381
+ id: null
382
+ });
383
+ setPosition({});
372
384
  }
373
385
  };
374
386
  const onResizeStop = (e, direction, ref, d, position) => {
@@ -10,7 +10,7 @@ const useResize = ({
10
10
  const defaultSize = getBreakPointsValue(allSize);
11
11
  const {
12
12
  width,
13
- height
13
+ height = 370
14
14
  } = parentDOM?.getBoundingClientRect() || {
15
15
  ...defaultSize
16
16
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flozy/editor",
3
- "version": "4.4.3",
3
+ "version": "4.4.6",
4
4
  "description": "An Editor for flozy app brain",
5
5
  "files": [
6
6
  "dist"