feat(ui): disable keyboard dnd

Need to fix a bug w/ collision detection before enabling it. Will pursue later.
This commit is contained in:
psychedelicious 2023-06-05 15:22:29 +10:00
parent 7bd94eac0e
commit b1000e30c1
2 changed files with 7 additions and 2 deletions

View File

@ -46,9 +46,12 @@ const ImageDndContext = (props: ImageDndContextProps) => {
const touchSensor = useSensor(TouchSensor, {
activationConstraint: { distance: 15 },
});
const keyboardSensor = useSensor(KeyboardSensor);
// TODO: Use KeyboardSensor - needs composition of multiple collisionDetection algos
// Alternatively, fix `rectIntersection` collection detection to work with the drag overlay
// (currently the drag element collision rect is not correctly calculated)
// const keyboardSensor = useSensor(KeyboardSensor);
const sensors = useSensors(mouseSensor, touchSensor, keyboardSensor);
const sensors = useSensors(mouseSensor, touchSensor);
return (
<DndContext

View File

@ -70,6 +70,7 @@ const UnifiedCanvasContent = () => {
return (
<Box
ref={setDroppableRef}
tabIndex={0}
sx={{
w: 'full',
h: 'full',
@ -109,6 +110,7 @@ const UnifiedCanvasContent = () => {
return (
<Box
ref={setDroppableRef}
tabIndex={-1}
sx={{
w: 'full',
h: 'full',