Drag & Drop with multiple draggables using keyboard navigation

Description

Acceptance Criteria

  1. Don't spend more than 2 hours

  2. Merge in the pull request if you're comfortable doing that with the testing you can do within this time limit

  3. Give feedback to the contributor if you find problems

  4. Talk to the PO if none of the above can be done within the two hours. We'll most likely postpone the issue with an updated estimate and a note of what has been done so far.

Background

Issue was reported in https://h5p.org/node/213196

Notes from papi Jo:

Drag & Drop with multiple draggables using keyboard navigation. See my sample activity at https://h5p.org/node/213152.

Use Chrome, press F12 to open the console.

Click the multiple (infinite) draggable "MULTI drag 00" and press Enter to select it. The only available dropzone "dropzone 00" gets highlighted. Press Enter again to drop the draggable there. OK. Now suppose you change your mind and decide to move that draggable out of the dropzone. Press Enter again to select it (it changes from blue to pink). Press the Down Arrow key to select as target the "MULTI drag 00" invisible dropzone to the right of the screen (it's invisible but it's located at the same place as the original "MULTI drag 00" draggable, to the right of the task zone. Press Enter. It works, the draggable is reset/returned to its original place.

However, the console now displays the error:

Uncaught TypeError: Cannot read property 'draggable' of undefined
at js_Feq3p9ZUXp-oQV0NZHehbn0G-bh9BUfNO5uQKCNZ0rg.js:18594
at js_Feq3p9ZUXp-oQV0NZHehbn0G-bh9BUfNO5uQKCNZ0rg.js:18594
at Array.every (<anonymous>)
at e.fire (js_Feq3p9ZUXp-oQV0NZHehbn0G-bh9BUfNO5uQKCNZ0rg.js:18594)
at e.value (js_Feq3p9ZUXp-oQV0NZHehbn0G-bh9BUfNO5uQKCNZ0rg.js:18594)
at e.value (js_Feq3p9ZUXp-oQV0NZHehbn0G-bh9BUfNO5uQKCNZ0rg.js:18594)
at e.value (js_Feq3p9ZUXp-oQV0NZHehbn0G-bh9BUfNO5uQKCNZ0rg.js:18594)

Environment

None

Acceptance Criteria

None

Status

Assignee

Frode Petterson

Reporter

Bienvenido Villadelrey

Labels

Funding

None

Code reviewer

None

Released

None

Time tracking

1h

Fix versions

None

Sprint

None

Priority

High
Configure