Skip to content

Commit b87fd3a

Browse files
committed
fix Repeater component dragging issue on WP 6.8
1 parent 163c329 commit b87fd3a

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

components/drag-handle/index.tsx

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { SVGProps } from 'react';
1+
import type { HTMLAttributes } from 'react';
22

33
/**
44
* Renders an SVG drag handle.
@@ -7,18 +7,19 @@ import type { SVGProps } from 'react';
77
* @returns {*} React JSX
88
*/
99

10-
export const DragHandle: React.FC<SVGProps<SVGSVGElement>> = (props) => (
11-
<svg
12-
style={{ marginRight: '10px', cursor: 'grab', flexShrink: 0 }}
13-
width="18"
14-
height="18"
15-
xmlns="http://www.w3.org/2000/svg"
16-
viewBox="0 0 18 18"
17-
role="img"
18-
aria-hidden="true"
19-
focusable="false"
20-
{...props}
21-
>
22-
<path d="M5 4h2V2H5v2zm6-2v2h2V2h-2zm-6 8h2V8H5v2zm6 0h2V8h-2v2zm-6 6h2v-2H5v2zm6 0h2v-2h-2v2z" />
23-
</svg>
10+
export const DragHandle: React.FC<HTMLAttributes<HTMLSpanElement>> = (props) => (
11+
<span {...props}>
12+
<svg
13+
style={{ marginRight: '10px', cursor: 'grab', flexShrink: 0 }}
14+
width="18"
15+
height="18"
16+
xmlns="http://www.w3.org/2000/svg"
17+
viewBox="0 0 18 18"
18+
role="img"
19+
aria-hidden="true"
20+
focusable="false"
21+
>
22+
<path d="M5 4h2V2H5v2zm6-2v2h2V2h-2zm-6 8h2V8H5v2zm6 0h2V8h-2v2zm-6 6h2v-2H5v2zm6 0h2v-2h-2v2z" />
23+
</svg>
24+
</span>
2425
);

0 commit comments

Comments
 (0)