IV w 2 DQs JS error

Description

Steps to reproduce:
1) Create an IV
2) Add a DragQuestion as a "poster" with 1 dropzone and 1 draggable. Draggable should be correct in dropzone.
3) Copy DQ
4) Paste DQ at a timestamp that is larger than the "to" timestamp of the first DQ
5) Make the pasted DQ into a "button"
6) Save IV
7) Go to first DQ, answer it correctly, press "continue"
8) Go to otter DQ and press button to open DQ
9) Attempt to drag draggable, observe JS errors:

h5p-drag-question.js?ver=1.11.0:1 Uncaught TypeError: Cannot read property 'draggable' of undefined
at HTMLDivElement.accept (http://localhost/sites/default/files/h5p/libraries/H5P.DragQuestion-1.11/h5p-drag-question.js?ver=1.11.0:1:31013)
at Object.prepareOffsets (http://localhost/sites/default/files/h5p/libraries/jQuery.ui-1.10/h5p-jquery-ui.js?ver=1.10.19:2144:51)
at $.(anonymous function).(anonymous function)._mouseStart (http://localhost/sites/default/files/h5p/libraries/jQuery.ui-1.10/h5p-jquery-ui.js?ver=1.10.19:1147:19)
at $.(anonymous function).(anonymous function)._mouseStart (http://localhost/sites/default/files/h5p/libraries/jQuery.ui-1.10/h5p-jquery-ui.js?ver=1.10.19:404:25)
at $.(anonymous function).(anonymous function)._mouseMove (http://localhost/sites/default/files/h5p/libraries/jQuery.ui-1.10/h5p-jquery-ui.js?ver=1.10.19:945:11)
at $.(anonymous function).(anonymous function)._mouseMove (http://localhost/sites/default/files/h5p/libraries/jQuery.ui-1.10/h5p-jquery-ui.js?ver=1.10.19:404:25)
at HTMLDocument._mouseMoveDelegate (http://localhost/sites/default/files/h5p/libraries/jQuery.ui-1.10/h5p-jquery-ui.js?ver=1.10.19:914:16)
at HTMLDocument.dispatch (http://localhost/sites/all/modules/h5p/library/js/jquery.js?ou215b:2:28337)
at HTMLDocument.v.handle (http://localhost/sites/all/modules/h5p/library/js/jquery.js?ou215b:2:25042)

Environment

None

Acceptance Criteria

1) No JS error when dragging draggables in DQ

Assignee

Thomas Marstrander

Reporter

Thomas Marstrander

Funding

None

Code reviewer

Timothy Lim

Released

Released

Time tracking

0m

Fix versions

Sprint

None

Affects versions

Priority

Medium
Configure