From ac07f290efa0a23744243a1df9481c9547d96d47 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 20 Jan 2020 19:36:19 +0100 Subject: [PATCH] Misaligned caret in Safari 13+ using the invisible space --- com.woltlab.wcf/templates/wysiwyg.tpl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/com.woltlab.wcf/templates/wysiwyg.tpl b/com.woltlab.wcf/templates/wysiwyg.tpl index 394a223ce3..8554634890 100644 --- a/com.woltlab.wcf/templates/wysiwyg.tpl +++ b/com.woltlab.wcf/templates/wysiwyg.tpl @@ -256,6 +256,11 @@ } }; + // The caret is misaligned in Safari 13+ when using \u200b. + if (Environment.browser() === 'safari') { + config.emptyHtml = '


'; + } + // user mentions if (elDataBool(element, 'support-mention')) { config.plugins.push('WoltLabMention'); @@ -290,7 +295,7 @@ config.callbacks.init = function() { // slight delay to allow Redactor to initialize itself window.setTimeout(function() { - if (content === '' && Environment.platform() === 'ios') { + if (content === '' && (Environment.platform() === 'ios' || Environment.browser() === 'safari')) { content = '


'; } -- 2.20.1