You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2020/10/30 21:47:36 UTC
[allura] 06/10: [#8260] [#7954] allow spellchecker on desktop;
but keep better experience on Android
This is an automated email from the ASF dual-hosted git repository.
brondsem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git
commit 3e2f0851f2b55cfc2cd5ed1ad3a8362e21069f12
Author: Dave Brondsema <db...@slashdotmedia.com>
AuthorDate: Fri Oct 30 20:46:18 2020 +0000
[#8260] [#7954] allow spellchecker on desktop; but keep better experience on Android
---
Allura/allura/lib/widgets/resources/js/sf_markitup.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Allura/allura/lib/widgets/resources/js/sf_markitup.js b/Allura/allura/lib/widgets/resources/js/sf_markitup.js
index e233e3d..831e076 100644
--- a/Allura/allura/lib/widgets/resources/js/sf_markitup.js
+++ b/Allura/allura/lib/widgets/resources/js/sf_markitup.js
@@ -58,7 +58,9 @@ $(window).load(function() {
autofocus: false,
spellChecker: false, // https://forge-allura.apache.org/p/allura/tickets/7954/
indentWithTabs: false,
- inputStyle: 'contenteditable',
+ // contenteditable allows native spellcheck and works fine for desktop browsers and ios (14)
+ // but its buggy on android and textarea works better https://github.com/codemirror/CodeMirror/issues/6349 https://github.com/codemirror/CodeMirror/issues/6145
+ inputStyle: navigator.userAgent.match(/Android/i) ? 'textarea' : 'contenteditable',
tabSize: 4,
toolbar: toolbar,
previewRender: previewRender,