InputCommand loses selection attributes when selection is anchored to attribute beginning #7816
Labels
bc:minor
Resolving this issue will introduce a minor breaking change.
domain:ui/ux
This issue reports a problem related to UI or UX.
package:typing
squad:core
Issue to be handled by the Core team.
support:2
An issue reported by a commercially licensed client.
type:bug
This issue reports a buggy (incorrect) behavior.
📝 Provide detailed reproduction steps (if any)
editor.execute( 'input', { text: 'foobar' } );
in your JavaScript console.✔️ Expected result
The inserted text keeps original styles (in this case bold).
❌ Actual result
The replaced part is not bold.
📃 Other details
This is a source of WebSpellChecker/wproofreader-ckeditor5#12 - as WSC team is using
editor.execute('input', { text: 'text' });
call to make text modifications.Reason for this is that we pick attributes from a new selection, after original part was removed:
ckeditor5/packages/ckeditor5-typing/src/inputcommand.js
Line 98 in 090c9f0
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: