Fossil SCM
Added error handling around default paragraph style.
Commit
2f0fa68b013fea58e5dacc8d138370ced7ff1b22d8323e55c114aceedff7913f
Parent
4bfd89a38efdb76…
1 file changed
+4
-1
+4
-1
| --- src/wysiwyg.c | ||
| +++ src/wysiwyg.c | ||
| @@ -218,11 +218,14 @@ | ||
| 218 | 218 | @ /* Initialize the document editor */ |
| 219 | 219 | @ function initDoc() { |
| 220 | 220 | @ initEventHandlers(); |
| 221 | 221 | @ oDoc = document.getElementById("wysiwygBox"); |
| 222 | 222 | @ if (!isWysiwyg()) { setDocMode(true); } |
| 223 | - @ document.execCommand("defaultParagraphSeparator", false, "p"); | |
| 223 | + @ try { | |
| 224 | + @ document.execCommand("defaultParagraphSeparator", false, "p"); | |
| 225 | + @ } catch { | |
| 226 | + @ } | |
| 224 | 227 | @ } |
| 225 | 228 | @ |
| 226 | 229 | @ function initEventHandlers() { |
| 227 | 230 | @ document.querySelector('form').onsubmit = wysiwygSubmit; |
| 228 | 231 | @ document.querySelector('#editMode').onchange = function() { |
| 229 | 232 |
| --- src/wysiwyg.c | |
| +++ src/wysiwyg.c | |
| @@ -218,11 +218,14 @@ | |
| 218 | @ /* Initialize the document editor */ |
| 219 | @ function initDoc() { |
| 220 | @ initEventHandlers(); |
| 221 | @ oDoc = document.getElementById("wysiwygBox"); |
| 222 | @ if (!isWysiwyg()) { setDocMode(true); } |
| 223 | @ document.execCommand("defaultParagraphSeparator", false, "p"); |
| 224 | @ } |
| 225 | @ |
| 226 | @ function initEventHandlers() { |
| 227 | @ document.querySelector('form').onsubmit = wysiwygSubmit; |
| 228 | @ document.querySelector('#editMode').onchange = function() { |
| 229 |
| --- src/wysiwyg.c | |
| +++ src/wysiwyg.c | |
| @@ -218,11 +218,14 @@ | |
| 218 | @ /* Initialize the document editor */ |
| 219 | @ function initDoc() { |
| 220 | @ initEventHandlers(); |
| 221 | @ oDoc = document.getElementById("wysiwygBox"); |
| 222 | @ if (!isWysiwyg()) { setDocMode(true); } |
| 223 | @ try { |
| 224 | @ document.execCommand("defaultParagraphSeparator", false, "p"); |
| 225 | @ } catch { |
| 226 | @ } |
| 227 | @ } |
| 228 | @ |
| 229 | @ function initEventHandlers() { |
| 230 | @ document.querySelector('form').onsubmit = wysiwygSubmit; |
| 231 | @ document.querySelector('#editMode').onchange = function() { |
| 232 |