Open jie-zhang opened 3 years ago
Hi, yes, as you mention this looks like a bug in CKEditor. Bugs in CKEditor do get fixed sooner or later ...
thanks for your answer. this is a wonderful tools, thank U.
This happens regularly for me and it is very easily to reproduce (at least for me on Trilium v0.46.7):
<ul>
<li>foo
<ul>
<li>bar</li>
</ul>
</li>
</ul>
foo
:
02:14:12.953 Uncaught TypeError: cyclic object value
onerror https://triliumdomain.tld/app/services/glob.js:60
setupGlobs https://triliumdomain.tld/app/services/glob.js:47
<anonymous> https://triliumdomain.tld/app/desktop.js:13
glob.js:60:41
02:14:12.953 Uncaught CKEditorError: can't access property "getStyle", t.viewItem.parent is null
Read more: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html#error-can't access property "getStyle", t.viewItem.parent is null
init https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
fire https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
_convertItem https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
convert https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
toModel https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
_runPendingChanges https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
change https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
toModel https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
_handleContainerChildrenMutations https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
handle https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
init https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
fire https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
_onMutations https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
Br https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
addObserver https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
ws https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
ga https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
jl https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
Cd https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
Gv https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
create https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
create https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
initEditor https://triliumdomain.tld/app/widgets/type_widgets/editable_text.js:106
doRender https://triliumdomain.tld/app/widgets/type_widgets/editable_text.js:83
render https://triliumdomain.tld/app/widgets/basic_widget.js:59
refresh https://triliumdomain.tld/app/widgets/note_detail.js:117
noteSwitched https://triliumdomain.tld/app/widgets/tab_aware_widget.js:61
tabNoteSwitchedEvent https://triliumdomain.tld/app/widgets/tab_aware_widget.js:56
callMethod https://triliumdomain.tld/app/widgets/component.js:86
handleEvent https://triliumdomain.tld/app/widgets/component.js:46
promise callback*handleEvent https://triliumdomain.tld/app/widgets/component.js:46
handleEventInChildren https://triliumdomain.tld/app/widgets/tab_caching_widget.js:73
handleEvent https://triliumdomain.tld/app/widgets/component.js:47
handleEventInChildren https://triliumdomain.tld/app/widgets/component.js:61
handleEvent https://triliumdomain.tld/app/widgets/component.js:47
handleEventInChildren https://triliumdomain.tld/app/widgets/component.js:61
handleEvent https://triliumdomain.tld/app/widgets/component.js:47
handleEventInChildren https://triliumdomain.tld/app/widgets/component.js:61
handleEvent https://triliumdomain.tld/app/widgets/component.js:47
handleEventInChildren https://triliumdomain.tld/app/widgets/component.js:61
handleEvent https://triliumdomain.tld/app/widgets/component.js:47
handleEventInChildren https://triliumdomain.tld/app/widgets/component.js:61
handleEvent https://triliumdomain.tld/app/widgets/component.js:47
triggerEvent https://triliumdomain.tld/app/services/app_context.js:86
triggerEvent https://triliumdomain.tld/app/widgets/component.js:53
openTabWithNote https://triliumdomain.tld/app/services/tab_manager.js:228
loadTabs https://triliumdomain.tld/app/services/tab_manager.js:100
allowUpdateWithoutChange https://triliumdomain.tld/app/services/spaced_update.js:59
loadTabs https://triliumdomain.tld/app/services/tab_manager.js:98
start https://triliumdomain.tld/app/services/app_context.js:35
async* https://triliumdomain.tld/app/desktop.js:33
promise callback* https://triliumdomain.tld/app/desktop.js:27
ckeditorerror.js:64:2
02:14:12.958 02:14:12 Uncaught error: Message: CKEditorError: model-nodelist-offset-out-of-bounds {"offset":4,"nodeList":[{"data":"foo"}]}
Read more: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/…t/error-codes.html#error-model-nodelist-offset-out-of-bounds, URL: https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript, Line: 5, Column: 7261, Error object: {"name":"CKEditorError","context":[{"data":"foo"}],"data":{"offset":4,"nodeList":[{"data":"foo"}]}}, Stack: o@https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5:7261
offsetToIndex@https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5:244720
offsetToIndex@https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5:245704
Ps@https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5:256223
get textNode@https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5:250451
bl@https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5:363125
_validateSelectionRange@https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5:362963
Ks/<@https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5:282624
fire@https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5:134459
_setRanges@https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5:276111
setTo@https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5:275173
setTo@https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5:283969
_setTo@https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5:281420
setSelection@https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5:346595
ga/</</<@https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5:301954
change@https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5:378339
ga/</<@https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5:301941
fire@https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5:134459
_handleSelectionChange@https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5:230689
observe/<@https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5:229988
fire@https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5:134459
i@https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5:220533
EventListener.handleEvent*attach@https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5:220278
listenTo@https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5:219669
observe@https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5:229946
attachDomRoot@https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5:238187
init@https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5:432974
create/</<@https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5:438020
promise callback*create/<@https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5:438005
create@https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5:437862
initEditor@https://triliumdomain.tld/app/widgets/type_widgets/editable_text.js:106:47
async*doRender@https://triliumdomain.tld/app/widgets/type_widgets/editable_text.js:83:33
render@https://triliumdomain.tld/app/widgets/basic_widget.js:59:14
refresh@https://triliumdomain.tld/app/widgets/note_detail.js:117:48
async*noteSwitched@https://triliumdomain.tld/app/widgets/tab_aware_widget.js:61:20
tabNoteSwitchedEvent@https://triliumdomain.tld/app/widgets/tab_aware_widget.js:56:24
callMethod@https://triliumdomain.tld/app/widgets/component.js:86:29
handleEvent/<@https://triliumdomain.tld/app/widgets/component.js:46:46
promise callback*handleEvent@https://triliumdomain.tld/app/widgets/component.js:46:30
handleEventInChildren@https://triliumdomain.tld/app/widgets/tab_caching_widget.js:73:31
handleEvent@https://triliumdomain.tld/app/widgets/component.js:47:18
handleEventInChildren@https://triliumdomain.tld/app/widgets/component.js:61:33
handleEvent@https://triliumdomain.tld/app/widgets/component.js:47:18
handleEventInChildren@https://triliumdomain.tld/app/widgets/component.js:61:33
handleEvent@https://triliumdomain.tld/app/widgets/component.js:47:18
handleEventInChildren@https://triliumdomain.tld/app/widgets/component.js:61:33
handleEvent@https://triliumdomain.tld/app/widgets/component.js:47:18
handleEventInChildren@https://triliumdomain.tld/app/widgets/component.js:61:33
handleEvent@https://triliumdomain.tld/app/widgets/component.js:47:18
handleEventInChildren@https://triliumdomain.tld/app/widgets/component.js:61:33
handleEvent@https://triliumdomain.tld/app/widgets/component.js:47:18
triggerEvent@https://triliumdomain.tld/app/services/app_context.js:86:21
triggerEvent@https://triliumdomain.tld/app/widgets/component.js:53:28
openTabWithNote@https://triliumdomain.tld/app/services/tab_manager.js:228:24
async*loadTabs/<@https://triliumdomain.tld/app/services/tab_manager.js:100:28
allowUpdateWithoutChange@https://triliumdomain.tld/app/services/spaced_update.js:59:19
loadTabs@https://triliumdomain.tld/app/services/tab_manager.js:98:31
async*start@https://triliumdomain.tld/app/services/app_context.js:35:25
async*@https://triliumdomain.tld/app/desktop.js:33:16
promise callback*@https://triliumdomain.tld/app/desktop.js:27:42
ws.js:20:13
02:14:12.959 Uncaught CKEditorError: model-nodelist-offset-out-of-bounds {"offset":4,"nodeList":[{"data":"foo"}]}
Read more: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/…t/error-codes.html#error-model-nodelist-offset-out-of-bounds
o https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
offsetToIndex https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
offsetToIndex https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
Ps https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
get textNode https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
bl https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
_validateSelectionRange https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
Ks https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
fire https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
_setRanges https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
setTo https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
setTo https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
_setTo https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
setSelection https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
ga https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
change https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
ga https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
fire https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
_handleSelectionChange https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
observe https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
fire https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
i https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
attach https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
listenTo https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
observe https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
attachDomRoot https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
init https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
create https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
promise callback*create/< https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
create https://triliumdomain.tld/#root/jKEBJaxum3hK/S5joI32U3I0i-l1Nc line 2 > injectedScript:5
initEditor https://triliumdomain.tld/app/widgets/type_widgets/editable_text.js:106
doRender https://triliumdomain.tld/app/widgets/type_widgets/editable_text.js:83
render https://triliumdomain.tld/app/widgets/basic_widget.js:59
refresh https://triliumdomain.tld/app/widgets/note_detail.js:117
noteSwitched https://triliumdomain.tld/app/widgets/tab_aware_widget.js:61
tabNoteSwitchedEvent https://triliumdomain.tld/app/widgets/tab_aware_widget.js:56
callMethod https://triliumdomain.tld/app/widgets/component.js:86
handleEvent https://triliumdomain.tld/app/widgets/component.js:46
promise callback*handleEvent https://triliumdomain.tld/app/widgets/component.js:46
handleEventInChildren https://triliumdomain.tld/app/widgets/tab_caching_widget.js:73
handleEvent https://triliumdomain.tld/app/widgets/component.js:47
handleEventInChildren https://triliumdomain.tld/app/widgets/component.js:61
handleEvent https://triliumdomain.tld/app/widgets/component.js:47
handleEventInChildren https://triliumdomain.tld/app/widgets/component.js:61
handleEvent https://triliumdomain.tld/app/widgets/component.js:47
handleEventInChildren https://triliumdomain.tld/app/widgets/component.js:61
handleEvent https://triliumdomain.tld/app/widgets/component.js:47
handleEventInChildren https://triliumdomain.tld/app/widgets/component.js:61
handleEvent https://triliumdomain.tld/app/widgets/component.js:47
handleEventInChildren https://triliumdomain.tld/app/widgets/component.js:61
handleEvent https://triliumdomain.tld/app/widgets/component.js:47
triggerEvent https://triliumdomain.tld/app/services/app_context.js:86
triggerEvent https://triliumdomain.tld/app/widgets/component.js:53
openTabWithNote https://triliumdomain.tld/app/services/tab_manager.js:228
loadTabs https://triliumdomain.tld/app/services/tab_manager.js:100
allowUpdateWithoutChange https://triliumdomain.tld/app/services/spaced_update.js:59
loadTabs https://triliumdomain.tld/app/services/tab_manager.js:98
start https://triliumdomain.tld/app/services/app_context.js:35
async* https://triliumdomain.tld/app/desktop.js:33
promise callback* https://triliumdomain.tld/app/desktop.js:27
ckeditorerror.js:64:2
The model-nodelist-offset-out-of-bounds
error is mentioned in the CKEditor documentation: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/tutorials/implementing-an-inline-widget.html#fixing-position-mapping
It might be worth trying new 0.47 beta which contains upgraded CKEditor ...
Same issue with 0.47.2, you can't (easily) edit a existing bullet point :/
Can confirm it is still in 0.47.3. I get this issue very often when editing a bullet list (and I'm not using any CJK characters, just English btw!) and it makes the entire editor behave strange (cannot delete existing text) until the page is refreshed. The changes made at that point are not saved.
This is quite a big issue since it means I'm practically unable to edit notes with bullet lists.
I'm having the same issue with a non-nested bullet list and a link in it. I already tested it with Firefox in safe mode to to be sure none of my extensions are to blame.
The bug @klausenbusk mentioned was fixed in the latest release, and I am unable to reproduce the other bug (that this issue was originally created for). Can you provide more detail on how to reproduce this?
I got an error when I edit with Chinese in the markdown format. it occured occasionally when I edit like this: 大主题
error log is as bellow. would you please check and fix it? (seems like a bug in CKEditor though...)
15:34:22.476 JS Error: Uncaught error: Message: Uncaught CKEditorError: model-nodelist-offset-out-of-bounds {"offset":2,"nodeList":[{"data":"的"}]} Read more: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html#error-model-nodelist-offset-out-of-bounds, URL: http://127.0.0.1:37840/#root/XgcTYh4L1Ptp/mPr6bWsu0ns4-xK7P, Line: 5, Column: 7462, Error object: {"name":"CKEditorError","context":[{"data":"的"}],"data":{"offset":2,"nodeList":[{"data":"的"}]}}, CKEditorError: model-nodelist-offset-out-of-bounds {"offset":2,"nodeList":[{"data":"的"}]} Read more: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html#error-model-nodelist-offset-out-of-bounds at vs.offsetToIndex (:5:238643)
at ys.offsetToIndex (:5:239627)
at Ts (:5:250146)
at As.get textNode [as textNode] (:5:244374)
at pl (:5:356473)
at fl._validateSelectionRange (:5:356309)
at Us. (:5:276465)
at Us.fire (:5:128716)
at Us._setRanges (:5:270034)
at Us.setTo (:5:269096)
Stack: Error
at Object.w [as logError] (http://127.0.0.1:37840/app-dist/desktop.js:1:77260)
at window.onerror (http://127.0.0.1:37840/app-dist/desktop.js:1:289443)