Andrey Antukh
c797656d17
🐛 Fix crash when pasting into an empty or element-focused caret ( #11150 )
...
Pasting text could throw "Unknown node type" and lose the paste. The
insertion paths assume the caret sits on a text node or a <br>, but the
browser can report it on a container element (the offset being a child
index, common in Firefox) or, for an empty text shape that was just
focused, on nothing at all: selectAll() returned early without ever
setting a selection.
Add resolveTextNodePosition(), which walks a (node, offset) pair down to
the addressed text node or line break and returns null instead of
throwing when it cannot. The selection controller normalizes the caret
with it before inserting text or a pasted fragment, and selectAll() now
collapses on the line break of an empty editor so the caret is always
usable.
Closes #11149
AI-assisted-by: longcat-2.0-free
2026-08-17 13:32:12 +02:00
Andrey Antukh
12e7ea038f
Merge remote-tracking branch 'origin/staging' into develop
2026-06-11 10:58:19 +02:00
Andrey Antukh
ba9b03268a
⬆️ Update backend and common dependencies ( #10108 )
...
* 🐛 Fix incorrect valkey uri on backend tests
* ⬆️ Update backend dependencies
* ⬆️ Update pnpm dependencies
* 📎 Fix minor linter issues
2026-06-11 10:11:23 +02:00
Andrey Antukh
4a8fb5af53
Merge remote-tracking branch 'origin/staging' into develop
2026-06-01 13:15:57 +02:00
Andrey Antukh
c5de4c27b0
Merge remote-tracking branch 'origin/main' into staging
2026-06-01 12:57:39 +02:00
John Eismeier
c156559f2c
📚 Fix several typos on code comments and messages ( #9946 )
...
Signed-off-by: John E <jeis4wpi@outlook.com>
2026-06-01 09:43:07 +02:00
Yamila Moreno
ddba2ffa75
📎 Update Kaleidos Copyright ( #9929 )
2026-05-29 11:24:58 +02:00
Aitor Moreno
bda977202a
🐛 Fix shift enter not working on text editor v2
2026-05-28 11:52:46 +02:00
Andrey Antukh
5a2c09f246
🐛 Fix TypeError when deleting text at edge spans in text editor
...
The text editor's SelectionController threw 'TypeError: Invalid text
node' when:
- Pressing Backspace to delete the only character of the **first** text
span in a paragraph that contains multiple spans.
- Pressing Delete to delete the only character of the **last** text
span in the same situation.
- Pressing a word-backward shortcut that empties the first span of a
multi-span paragraph.
In all three cases the tree-iterator (previousNode / nextNode) returned
null because no sibling text node existed in that direction, and that
null was subsequently passed to getTextNodeLength() which calls
isTextNode() — which unconditionally throws when given a falsy value.
Fix: use the null-coalescing fallback to the first/last remaining
child's text node of the paragraph before calling collapse() /
getTextNodeLength().
2026-04-08 21:03:46 +02:00
Alejandro Alonso
62cc555084
🐛 Fix spurious mixed text styles on multi-span selection
2026-03-30 12:19:16 +02:00
Andrey Antukh
3be1ae2ac1
🐛 Guard against null focusNode/anchorNode in text-editor
2026-03-27 10:26:54 +01:00
Elena Torró
72cfd5d996
Merge pull request #8770 from penpot/superalex-fix-text-v2-firefox-word-selection-styles
...
🐛 Fix wrong typography font size in sidebar when selecting text in Firefox (editor v2)
2026-03-26 11:59:23 +01:00
Alejandro Alonso
334039668d
🐛 Fix wrong typography font size in sidebar when selecting text in Firefox (editor v2)
2026-03-25 10:38:56 +01:00
Alejandro Alonso
efd3efff00
🐛 Fix text-align before typing and sync attrs with v2 editor
2026-03-24 08:57:10 +01:00
Aitor Moreno
40233e3316
🐛 Fix text alignment options
2026-02-25 12:47:07 +01:00
Aitor Moreno
4477b2b4a0
🎉 Compute selection rects from pointer events
2026-02-24 11:09:45 +01:00
Alejandro Alonso
f2d09a6140
🐛 Preserving selection when applying styles to selected text range
2026-02-16 17:39:30 +01:00
Andrey Antukh
12e5d8d8c4
Merge remote-tracking branch 'origin/staging-render' into develop
2026-02-12 11:00:56 +01:00
Aitor Moreno
e722e17b10
🐛 Fix paragraph styles not being applied
2026-02-11 12:49:20 +01:00
Aitor Moreno
755d720b34
🐛 Fix text editor fills not being updated
2026-02-11 12:29:03 +01:00
Aitor Moreno
e9b2e9e818
🚑 Hot fix for text editor internal error
2026-02-10 11:10:16 +01:00
Andrey Antukh
ac1c3ff184
Merge branch 'staging-render' into develop
2026-02-09 14:14:02 +01:00
Aitor Moreno
b72959544c
🐛 Fix text not restored on ctrl+z
2026-02-09 13:29:31 +01:00
Andrey Antukh
c99fac000a
Merge remote-tracking branch 'origin/staging-render' into develop
2026-02-03 09:30:16 +01:00
Aitor Moreno
07b9ef0fd6
🔧 Add more v2 text editor tests
2026-02-02 09:35:28 +01:00
Andrey Antukh
0527124f2f
Merge remote-tracking branch 'origin/staging-render' into develop
2026-01-27 17:56:03 +01:00
Aitor Moreno
de41cb5488
🐛 Fix add/remove fills to text nodes
2026-01-27 12:17:10 +01:00
Aitor Moreno
f4f4f5bbb5
🐛 Fix multiple issues and tests
2026-01-26 14:14:06 +01:00
Andrey Antukh
dc44156b53
🐛 Fix text editor wasm playground
2026-01-22 13:55:41 +01:00
Aitor Moreno
2c9159288f
🐛 Fix previous styles lost when changing selected text
2026-01-14 11:10:01 +01:00
Aitor Moreno
7819e6c440
🐛 Fix previous styles lost when changing selected text
2026-01-07 12:41:39 +01:00
Belén Albeza
5cf51f3d26
🐛 Fix text selection not being restore if it was only 1 word
2025-12-10 15:05:13 +01:00
Belén Albeza
25acad5154
🔧 Add formatting rules to the TextEditor
2025-12-10 15:04:34 +01:00
Aitor Moreno
0d21e52068
🐛 Fix applyStylesTo entire selection
2025-12-03 11:07:33 +01:00
Elena Torro
1ba15e5d10
🐛 Do not merge fill styles
2025-12-03 08:55:11 +01:00
Elena Torro
c6b64a8e39
🐛 Fix selectAll on mixed span styles
2025-12-02 16:50:48 +01:00
Elena Torro
511e80c948
🐛 Fix merge fill styles when there are multiple fills
2025-12-02 16:50:04 +01:00
Aitor Moreno
405ddb60d8
🐛 Fix letter spacing applied to paragraph
2025-12-02 10:45:19 +01:00
Aitor Moreno
876d5783cf
✨ Add text editor v2 integration tests
2025-12-01 15:56:52 +01:00
Belén Albeza
4d6d7a6a3d
🐛 Fix emoji font not being used as fallback in text editor dom
2025-11-27 17:23:20 +01:00
Belén Albeza
f84c236e02
🐛 Fix text editor v2 not using fallback fonts for selected text
2025-11-27 12:26:39 +01:00
Elena Torró
4f24a8f5f1
Merge pull request #7770 from penpot/ladybenko-12587-fix-text-editor-crash-empty
...
🐛 Fix crash when using a font family with a number in its name
2025-11-21 12:02:40 +01:00
Belén Albeza
76f5c73de6
✨ Remove leftover console.log/trace
2025-11-21 10:59:15 +01:00
Belén Albeza
c6dd3e0eeb
✨ Add missing param to cut handler
2025-11-21 10:28:48 +01:00
alonso.torres
fde73f30b9
🐛 Fix paste crash
2025-11-21 09:51:54 +01:00
Belén Albeza
d0d2f43ca1
🐛 Fix text editor crash with font families with a number in their name
2025-11-20 15:22:40 +01:00
Aitor Moreno
d73be5832b
🎉 Add an option to enable and disable HTML paste
2025-11-20 13:33:51 +01:00
Aitor Moreno
f609747322
🐛 Fix inert element error
2025-11-19 18:23:44 +01:00
Elena Torro
368f4cfe81
🐛 Fix text editor select all functionality and inner paste corner cases
2025-11-17 16:24:52 +01:00
Elena Torro
eaa3904a3a
🔧 Remove unused text attrs
2025-10-31 09:22:01 +01:00