XWIKI-9163: The WYSIWYG editor transforms the content into HTML code when reloading certain types of documents
* Make the Selection implementation fail safe when there is no native selection (e.g. when the rich text area is hidden).