JS error in SCS when exiting show solution screen

Description

Steps to reproduce:
1) Create SCS
2) In behaviour disable 'retry' button
3) Take SCS
4) Go to Show solution screen
5) Exit show solution screen

Observe error in console:
question.js?ver=1.2.3:1406 Uncaught TypeError: Cannot read property '$element' of undefined
at SingleChoiceSet.Question.self.focusButton (question.js?ver=1.2.3:1406)
at SolutionView.<anonymous> (single-choice-set.js?ver=1.9.0:80)
at SolutionView.call (h5p-event-dispatcher.js?oty4r9:209)
at SolutionView.EventDispatcher.trigger (h5p-event-dispatcher.js?oty4r9:240)
at SolutionView.H5P.SingleChoiceSet.SolutionView.SolutionView.hide (solution-view.js?ver=1.9.0:74)
at HTMLButtonElement.click (solution-view.js?ver=1.9.0:38)
at HTMLButtonElement.dispatch (jquery.js?oty4r9:2)
at HTMLButtonElement.v.handle (jquery.js?oty4r9:2)

Environment

None

Acceptance Criteria

1) No JS error
2) Focus must work properly when changing screens

Assignee

Frode Petterson

Reporter

Thomas Marstrander

Labels

Funding

None

Code reviewer

None

Released

Released

Time tracking

0m

Fix versions

Sprint

None

Affects versions

Priority

Medium
Configure