Fixed issues with selection and focus in wysiwyg editor plugins