Skip to content

Commit

Permalink
Use a div as the drag handle
Browse files Browse the repository at this point in the history
Firefox can't make buttons draggable.
  • Loading branch information
oandregal committed Sep 5, 2018
1 parent 63f63d9 commit 8ee6afa
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/editor/src/components/block-mover/drag-handle.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import classnames from 'classnames';
/**
* WordPress dependencies
*/
import { IconButton, Draggable } from '@wordpress/components';
import { Draggable } from '@wordpress/components';

export const IconDragHandle = ( { isVisible, className, icon, onFocus, onBlur, onDragStart, onDragEnd, blockElementId, order, rootClientId, clientId, layout } ) => {
if ( ! isVisible ) {
Expand All @@ -30,9 +30,8 @@ export const IconDragHandle = ( { isVisible, className, icon, onFocus, onBlur, o
>
{
( { onDraggableStart, onDraggableEnd } ) => (
<IconButton
<div
className={ dragHandleClassNames }
icon={ icon }
aria-hidden="true"
aria-label=""
tabIndex="-1"
Expand All @@ -41,7 +40,9 @@ export const IconDragHandle = ( { isVisible, className, icon, onFocus, onBlur, o
onDragStart={ onDraggableStart }
onDragEnd={ onDraggableEnd }
draggable
/>
>
{ icon }
</div>
) }
</Draggable>
);
Expand Down

0 comments on commit 8ee6afa

Please sign in to comment.