Editor remembers focused elements on changing content type

Description

To replicate the bug:

  • Make sure you're on the HFP-225-wysiwyg-editor-arrow-key-movement of h5p-drag-n-bar

  • Create a text box in CP, note that it can be moved using the arrow keys

  • Switch to the drag and drop editor and create a text element

  • Switch back to CP editor, create and try to move a text box. Note that it can't be moved.

The editor remembers focused elements when changing content type, meaning that it piles up with multiple focused elements and gets confused about what to handle.
This happens somethimes opening editor for sub content, example DnD inside CP. CP elements are still in focus while DnD editor is active.

This issue blocks

Environment

None

Acceptance Criteria

The editor should not remember focused element on changing content type.

Status

Assignee

Frode Petterson

Reporter

Jelena Milinovic

Labels

Funding

None

Code reviewer

Pål Jørgensen

Released

None

Time tracking

6h

Fix versions

Sprint

None

Priority

Medium
Configure