FIX: Stop using duplicate composer button ID (#11404)

"quote" is used by the button added in `composer-editor`.
bbe5d8d5cf/app/assets/javascripts/discourse/app/components/composer-editor.js (L875-L882)
This commit is contained in:
Gerhard Schlager 2020-12-04 00:05:43 +01:00 committed by GitHub
parent da9b837da0
commit 1960fc5333
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

@ -104,7 +104,7 @@ class Toolbar {
}
this.addButton({
id: "quote",
id: "blockquote",
group: "insertions",
icon: "quote-right",
shortcut: "Shift+9",

View File

@ -459,13 +459,13 @@ third line`
textarea.selectionStart = 0;
await click("button.quote");
await click("button.blockquote");
assert.equal(this.value, "> one\n> \n> two\n> \n> three");
assert.equal(textarea.selectionStart, 0);
assert.equal(textarea.selectionEnd, 25);
await click("button.quote");
await click("button.blockquote");
assert.equal(this.value, "one\n\ntwo\n\nthree");
},
});
@ -481,7 +481,7 @@ third line`
textarea.selectionStart = 6;
textarea.selectionEnd = 10;
await click("button.quote");
await click("button.blockquote");
assert.equal(this.value, "one\n\n\n> \n> two");
},
});
@ -490,12 +490,12 @@ third line`
textarea.selectionStart = 6;
textarea.selectionEnd = 9;
await click("button.quote");
await click("button.blockquote");
assert.equal(this.value, "hello\n\n> wor\n\nld.");
assert.equal(textarea.selectionStart, 7);
assert.equal(textarea.selectionEnd, 12);
await click("button.quote");
await click("button.blockquote");
assert.equal(this.value, "hello\n\nwor\n\nld.");
assert.equal(textarea.selectionStart, 7);
@ -504,7 +504,7 @@ third line`
textarea.selectionStart = 15;
textarea.selectionEnd = 15;
await click("button.quote");
await click("button.blockquote");
assert.equal(this.value, "hello\n\nwor\n\nld.\n\n> Blockquote");
});