Skip to content

Commit

Permalink
changed dnd react-select sensors to Pointer only
Browse files Browse the repository at this point in the history
  • Loading branch information
nk-o committed Feb 29, 2024
1 parent 19c34f7 commit 79ef4be
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 14 deletions.
6 changes: 2 additions & 4 deletions assets/components/select/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ import selectStyles from 'gutenberg-react-select-styles';

import {
DndContext,
MouseSensor,
TouchSensor,
PointerSensor,
closestCenter,
useSensor,
useSensors,
Expand All @@ -43,8 +42,7 @@ export default function Select(props) {
// Set activation distance to prevent conflict with remove button.
const activationConstraint = { distance: 4 };
const sensors = useSensors(
useSensor(MouseSensor, { activationConstraint }),
useSensor(TouchSensor, { activationConstraint })
useSensor(PointerSensor, { activationConstraint })
);

// Tags.
Expand Down
2 changes: 1 addition & 1 deletion build/control-file.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react', 'react-dom', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => '491cdaf4e292fd755ab9');
<?php return array('dependencies' => array('react', 'react-dom', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => '35946577e5f056c2f1ef');
2 changes: 1 addition & 1 deletion build/control-file.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/editor-constructor.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins'), 'version' => '60ce5aa74272d7116cac');
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins'), 'version' => 'ceed0295065c9535fe80');
6 changes: 3 additions & 3 deletions build/editor-constructor.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/editor.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => 'bbe1e457812264e576ef');
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => '2ef53d47b76342fa8044');
6 changes: 3 additions & 3 deletions build/editor.js

Large diffs are not rendered by default.

0 comments on commit 79ef4be

Please sign in to comment.