Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Won't Do
-
3.11.7
-
None
-
MOODLE_311_STABLE
Description
Certain html element (e.g. <audio>)are not selectable in Atto and thus not removable (unless you switch to the html source code view) when nothing else is in the editor.
Steps to reproduce
- Open any page with an atto editor.
- Record audio through the recordrtc atto plugin.
- Remove the recorded audio again.
- Record audio through the recordrtc atto plugin.
- You can now no longer select anything in the atto editor (in wysiwyg mode) and thus can't remove the audio.
The selection in atto is handled through rangy (lib/editor/atto/yui/src/rangy). I've tested this in Chrome and noticed that here the browser returns a Selection object with a rangeCount of 0 which leads to nothing being selected.
Workaround
Switch to html mode and remove the element there.
Possible solution
Since rangy is no longer being maintained (except for this fork) a solution could be for recordrtc to add a <br> after the recording if the editor is empty otherwise.