@@ -118,6 +118,29 @@ describe('Backspace keydown', function () {
118118 . last ( )
119119 . should ( 'have.text' , '12' ) ;
120120 } ) ;
121+
122+
123+ it ( ' | — should delete visible and invisble whitespaces in the abscence of any non whitespace characters' , function ( ) {
124+ createEditorWithTextBlocks ( [
125+ '1' ,
126+ ' ' ,
127+ ] ) ;
128+
129+ cy . get ( '[data-cy=editorjs]' )
130+ . find ( '.ce-paragraph' )
131+ . last ( )
132+ . click ( )
133+ . type ( '{downArrow}' )
134+ . type ( '{backspace}' )
135+ . type ( '{backspace}' )
136+ . type ( '{backspace}' )
137+ . type ( '{backspace}' ) ;
138+
139+ cy . get ( '[data-cy=editorjs]' )
140+ . find ( 'div.ce-block' )
141+ . last ( )
142+ . should ( 'have.text' , '1' ) ;
143+ } ) ;
121144 } ) ;
122145
123146 it ( 'should just delete chars (native behaviour) when some fragment is selected' , function ( ) {
@@ -184,7 +207,7 @@ describe('Backspace keydown', function () {
184207 * Saving logic is not necessary for this test
185208 */
186209 // eslint-disable-next-line @typescript-eslint/no-empty-function
187- public save ( ) : void { }
210+ public save ( ) : void { }
188211 }
189212
190213 cy . createEditor ( {
@@ -545,7 +568,7 @@ describe('Backspace keydown', function () {
545568 * Saving logic is not necessary for this test
546569 */
547570 // eslint-disable-next-line @typescript-eslint/no-empty-function
548- public save ( ) : void { }
571+ public save ( ) : void { }
549572 }
550573
551574 cy . createEditor ( {
@@ -678,7 +701,7 @@ describe('Backspace keydown', function () {
678701
679702 describe ( 'at the start of the first Block' , function ( ) {
680703 it ( 'should do nothing if Block is not empty' , function ( ) {
681- createEditorWithTextBlocks ( [ 'The only block. Not empty' ] ) ;
704+ createEditorWithTextBlocks ( [ 'The only block. Not empty' ] ) ;
682705
683706 cy . get ( '[data-cy=editorjs]' )
684707 . find ( '.ce-paragraph' )
0 commit comments