diff --git a/addons/web_editor/static/tests/wysiwyg_keyboard_tests.js b/addons/web_editor/static/tests/wysiwyg_keyboard_tests.js
index e8696a802c5..56ceb27a025 100644
--- a/addons/web_editor/static/tests/wysiwyg_keyboard_tests.js
+++ b/addons/web_editor/static/tests/wysiwyg_keyboard_tests.js
@@ -3110,6 +3110,55 @@ var keyboardTestsBackspace = [{
start: "p:eq(1):contents()[0]->1",
},
},
+ {
+ name: "in h1: BACKSPACE on full selection -> 'a'",
+ content: '
dom to delete
',
+ steps: [{
+ start: 'h1:contents()[0]->0',
+ end: 'h1:contents()[0]->13',
+ key: 'BACKSPACE',
+ }, {
+ key: 'a',
+ }],
+ test: {
+ content: 'a
',
+ start: "h1:contents()[0]->1",
+ },
+ },
+ {
+ name: "in h1: BACKSPACE on full selection -> BACKSPACE -> 'a'",
+ content: 'dom to delete
',
+ steps: [{
+ start: 'h1:contents()[0]->0',
+ end: 'h1:contents()[0]->13',
+ key: 'BACKSPACE',
+ }, {
+ key: 'BACKSPACE',
+ }, {
+ key: 'a',
+ }],
+ test: {
+ content: 'a
',
+ start: "p:contents()[0]->1",
+ },
+ },
+ {
+ name: "in h1: BACKSPACE on full selection -> DELETE -> 'a'",
+ content: 'dom to delete
',
+ steps: [{
+ start: 'h1:contents()[0]->0',
+ end: 'h1:contents()[0]->13',
+ key: 'BACKSPACE',
+ }, {
+ key: 'DELETE',
+ }, {
+ key: 'a',
+ }],
+ test: {
+ content: 'a
',
+ start: "h1:contents()[0]->1",
+ },
+ },
// merging non-similar blocks