mirror of
https://github.com/TriliumNext/Trilium.git
synced 2025-12-09 19:43:01 -06:00
When editing table data in a text note, CKEditor 5 suddenly crashes. #311
Closed
opened 2025-10-01 15:50:54 -05:00 by giteasync
·
5 comments
No Branch/Tag Specified
main
feat/improve-docs-take1
bugfix/title-color-in-note-tree
stable
feat/rice-searching-with-sqlite
feat/persistant-tray
migrate_pageurl
feat/push-to-wiki-when-docs-change
feat/redo-llm-feature-take2
weblate-trilium-client
kev/share-html
feat/website/improvements
fix/mkdocs-take-2
feature/dx
fix/try-to-fix-swaggerui-api-pages
feat/add-ckeditor-plugin-options
feat/improve-docs
feat/add-websocket-docs
feat/llm-tool-improvement
feat/better-image-viewer
feature/electron-builder
feat/add-ocr-capabilities
feature/fs_sync
renovate/csrf-csrf-4.x
algolia_v1
v0.100.0
v0.99.5
v0.99.4
v0.99.3
v0.99.2
v0.99.1
v0.99.0
v0.98.1
v0.98.0
v0.97.2
v0.97.1
v0.97.0
v0.96.0
v0.95.0
v0.94.1
v0.94.0
v0.93.0
v0.92.7
v0.92.6
v0.92.5-beta
v0.92.4
v0.92.3-beta
v0.92.2-beta
v0.92.1-beta
v0.92.0-beta
v0.91.6
v0.91.5
v0.91.4-rc1
v0.91.4-beta
v0.91.3-beta
v0.91.2-beta
v0.91.1-beta
v0.90.12
v0.90.11-beta
v0.90.10-beta
v0.90.9-beta
v0.90.8
v0.90.7-beta
nightly
v0.90.6-beta
v0.90.5-beta
v0.90.4
v0.90.3
v0.90.2-beta
v0.90.1-beta
v0.90.0-beta
v0.63.7
v0.63.6
v0.63.5
v0.63.4
v0.63.3
v0.63.2-beta
v0.62.6
v0.63.1.1-beta
v0.63.1-beta
v0.62.5
v0.63.0-beta
v0.62.4
v0.62.3
v0.62.2
v0.61.15
v0.61.14
v0.62.1-beta
v0.62.0-beta
v0.61.13
v0.61.12
v0.61.11
v0.61.10-beta
v0.61.9-beta
v0.61.8-beta
v0.61.7-beta
v0.61.6-beta
v0.61.5-beta
v0.61.4-beta
v0.61.3-beta
v0.61.2-beta
v0.61.1-beta
v0.61.0-beta
v0.60.4
v0.60.3
v0.60.2-beta
v0.60.1-beta
v0.60.0-beta
v0.59.4
v0.59.3
v0.59.2
v0.59.1
v0.59.0-beta
v0.58.8
v0.58.7
v0.58.6
v0.58.5
v0.58.4
v0.58.3-beta
v0.58.2-beta
v0.58.1-beta
v0.58.0-beta
v0.57.5
v0.57.4
v0.57.3
v0.57.2
v0.57.1-beta
v0.57.0-beta
v0.56.2
v0.56.1
v0.56.0-beta
v0.55.1
v0.55.0-beta
v0.54.3
v0.54.2
v0.54.1-beta
v0.54.0-beta
v0.53.2
v0.53.1-beta
v0.52.4
v0.53.0-beta
v0.52.3
v0.52.2
v0.52.1-beta
v0.52.0-beta
v0.51.2
v0.51.1-beta
v0.51.0-beta
v0.50.3
v0.50.2
v0.50.1
v0.50.0-beta
v0.49.5
v0.49.4
v0.49.3
v0.49.2-beta
v0.49.1-beta
v0.49.0-beta
v0.48.9
v0.48.8
v0.48.7
v0.48.6-docker
v0.48.6.1
v0.48.6
v0.48.5
v0.48.4
v0.48.3
v0.48.2
v0.48.1-beta
v0.48.0-beta
v0.47.8
v0.47.7
v0.47.6
v0.47.5
v0.47.4
v0.47.3
v0.47.2
v0.46.9
v0.47.1-beta
v0.46.8
v0.47.0-beta
v0.46.7
v0.46.6
v0.46.5
v0.46.4-beta
v0.46.3-beta
v0.46.2-beta
v0.46.1-beta
v0.46.0-beta
v0.45.10
v0.45.9
v0.45.8
v0.45.7
v0.45.6
v0.45.5
v0.45.4
v0.45.3
v0.45.2
v0.45.1
v0.45.0-beta
v0.44.9
v0.44.8
v0.44.7
v0.44.6
v0.44.5
v0.44.4
v0.44.3-beta
v0.44.2-beta
v0.44.1-beta
v0.44.0-beta
v0.43.4
v0.43.3
v0.43.2
v0.43.1
v0.43.0-beta
v0.42.7
v0.42.6
v0.42.5
v0.42.4
v0.42.3
v0.42.2
v0.42.1
v0.42.0-beta
v0.41.6
v0.41.5
v0.41.4-beta
0.41.3
v0.41.3-beta
v0.41.2-beta
v0.41.1-beta
v0.41.0-beta
v0.40.7
v0.40.6
v0.40.5
v0.40.4
v0.40.3
v0.40.2
v0.40.1
v0.39.6
v0.40.0-beta
v0.39.5
v0.39.4
v0.39.3
v0.39.2-beta
v0.39.1-beta
v0.39.0-beta
v0.38.3
v0.38.2
v0.38.1-beta
v0.38.0-beta
v0.37.8
v0.37.7
v0.37.6
v0.37.5
v0.37.4
v0.37.3
v0.37.2
v0.37.1-beta
v0.37.0-beta
v0.36.5
v0.36.4
v0.36.3
v0.36.2
v0.36.1-beta
v0.36.0-beta
v0.35.2
v0.35.1
v0.35.0-beta
v0.34.3
v0.34.2
v0.34.1
v0.34.0-beta
v0.33.7
v0.33.6
v0.33.5
v0.33.4
v0.33.3
v0.33.2-beta
v0.33.1-beta
v0.33.0-beta
v0.32.4
v0.32.3
v0.32.2-beta
v0.32.1-beta
v0.32.0-beta
v0.31.6
v0.31.5
v0.31.4
v0.31.3
v0.31.2-beta
v0.30.8
v0.31.1-beta
v0.31.0-beta
v0.30.7
v0.30.6
v0.30.5
v0.30.4
v0.30.3-beta
v0.30.2-beta
v0.30.1-beta
v0.30.0-beta
v0.29.1
v0.29.0-beta
v0.28.3
v0.28.2
v0.28.1-beta
v0.28.0-beta
v0.27.4
v0.27.3
v0.27.2-beta
v0.27.1-beta
v0.27.0-beta
v0.26.1
v0.26.0-beta
v0.25.2
v0.25.1-beta
v0.25.0-beta
v0.24.5
v0.24.4-beta
v0.24.3-beta
v0.24.2-beta
v0.24.1-beta
v0.24.0-beta
v0.23.1
v0.23.0
v0.22.1
v0.22.0
v0.21.0
v0.20.2
v0.20.1
v0.20.0
v0.19.1
v0.19.0
v0.18.0
v0.17.0
v0.16.0
v0.15.0
v0.14.1
v0.14.0
v0.13.0-beta
v0.12.0
v0.11.1
v0.11.0-beta
v0.10.2-beta
v0.10.1-beta
v0.10.0-beta
v0.9.2
v0.9.1-beta
v0.9.0-beta
v0.8.1
v0.8.0-beta
v0.7.0-beta
v0.6.2
v0.6.1
v0.6.0-beta
v0.5.6
v0.5.5-beta
v0.5.4-beta
v0.5.3-beta
v0.5.2-beta
v0.5.1-beta
v0.5.0-beta
v0.4.1
v0.4.0-beta
v0.3.3
v0.3.2
v0.3.1
v0.3.0
v0.2.2
v0.2.1
v0.2.0
v0.1.2
v0.1.1
v0.1.0
v0.0.11
v0.0.10
v0.0.9
Labels
Clear labels
BE
Difficulty: Easy
Difficulty: Hard
Difficulty: Hard
State: Blocked
State: Outdated
State: Triage
State: Triage
State: Under Debate
Type: Documentation
Type: Scripts & Themes
UI
UI
UI
awaiting feedback
ckeditor
container
dependencies
desktop-app
downstream
effort-high
effort-low
effort-medium
geo-map
llm
mermaid diagrams
mobile
ported-issues
pull-request
Mirrored from GitHub Pull Request
question
refactor
regression
scripting
search
search
sync
upstream
web-clipper
No Label
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: TriliumNext/Trilium#311
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @SiriusXT on GitHub.
Description
This issue seems to occur only when the toolbar is floating.
Steps to reproduce:
Insert a table and enter some sample data.
Select part of the text within a cell.
Type directly on the keyboard to replace the selected text.
The editor is likely to crash unexpectedly at this point.
TriliumNext Version
0.94.0, 0.94.1
What operating system are you using?
Windows
What is your setup?
Local + server sync
Operating System Version
windows11
Error logs
Interestingly, different browsers throw different errors.
Firefox throws:
Object { message: "Index or size is negative or greater than the allowed amount\nRead more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-Index or size is negative or greater than the allowed amount", stack: "viewRangeToDom@http://localhost:4200/assets/v0.94.1/@fs/X:/workspace/others/trilium/Notes/node_modules/.vite/apps/client/deps/ckeditor5.js?v=1909f8b1:15911:14\ntarget@http://localhost:4200/assets/v0.94.1/@fs/X:/workspace/others/trilium/Notes/node_modules/.vite/apps/client/deps/ckeditor5.js?v=1909f8b1:58465:68\ngetDomElement@http://localhost:4200/assets/v0.94.1/@fs/X:/workspace/others/trilium/Notes/node_modules/.vite/apps/client/deps/ckeditor5.js?v=1909f8b1:51112:26\nattachTo@http://localhost:4200/assets/v0.94.1/@fs/X:/workspace/others/trilium/Notes/node_modules/.vite/apps/client/deps/ckeditor5.js?v=1909f8b1:50189:33\n_startPinning@http://localhost:4200/assets/v0.94.1/@fs/X:/workspace/others/trilium/Notes/node_modules/.vite/apps/client/deps/ckeditor5.js?v=1909f8b1:50292:15\npin@http://localhost:4200/assets/v0.94.1/@fs/X:/workspace/others/trilium/Notes/node_modules/.vite/apps/client/deps/ckeditor5.js?v=1909f8b1:50261:15\nupdatePosition@http://localhost:4200/assets/v0.94.1/@fs/X:/workspace/othe…", filename: "http://localhost:4200/assets/v0.94.1/@fs/X:/workspace/others/trilium/Notes/node_modules/.vite/apps/client/deps/ckeditor5.js?v=1909f8b1", lineno: 3711, colno: 5, date: 1749303465796 }
Electron and Edge throw:
Uncaught CKEditorError: Failed to execute 'setEnd' on 'Range': The offset 4 is larger than the node's length (3).
Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-Failed to execute 'setEnd' on 'Range': The offset 4 is larger than the node's length (3).
at $p.viewRangeToDom (layout_commons.js:908:71630)
at target (layout_commons.js:984:74931)
at Qf (layout_commons.js:978:21108)
at Gl.attachTo (layout_commons.js:978:15318)
at Gl._startPinning (layout_commons.js:978:16348)
at Gl.pin (layout_commons.js:978:15953)
at on.updatePosition (layout_commons.js:984:62822)
at Px (layout_commons.js:1018:23695)
at on. (layout_commons.js:1018:23460)
at on.fire (layout_commons.js:824:1598)
@eliandoran commented on GitHub:
Interestingly, this is a different way to trigger TriliumNext/trilium#5781 , so let's treat it there.
@dosubot[bot] commented on GitHub:
Hi @SiriusXT! I'm Dosu and I’m helping the Notes team.
This is a known bug in TriliumNext 0.94.0 and 0.94.1, likely caused by the upgrade of CKEditor from version 42 to 45, which changed some editor behaviors and introduced issues with text selection and editing—especially with the floating toolbar and tables. The crash is reproducible and affects multiple browsers, each showing slightly different errors.
There are two confirmed workarounds: change the theme in TriliumNext, or (if using Firefox) enable the Dark Reader extension for the Trilium site. Copy/paste still works even if selection is invisible. A fix is planned for the next version of TriliumNext. More details and discussion are available here.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

@eliandoran commented on GitHub:
@SiriusXT , how easy is it to reproduce? On my side I can't seem to trigger it.
@eliandoran commented on GitHub:
@SiriusXT , you're right, I mistakenly thought that I had the floating toolbar enabled.
@SiriusXT commented on GitHub:
@eliandoran Huh, that’s odd — it’s consistently reproducible on my end, even across different machines.
Note: the toolbar needs to be floating for the issue to occur.
Here’s a screen recording of the reproduction in a sandboxed environment:
https://github.com/user-attachments/assets/d36f32a8-91ad-4adc-a43c-b9715afbdae4