mirror of
https://github.com/discourse/discourse.git
synced 2025-02-21 08:59:41 +08:00
FIX: Can't quote last paragraph.
This commit is contained in:
parent
b2b10c0f3c
commit
ce9fe213fd
@ -33,7 +33,8 @@ export default Ember.Component.extend({
|
||||
for (let r = 0; r < selection.rangeCount; r++) {
|
||||
const range = selection.getRangeAt(r);
|
||||
|
||||
if ($(range.endContainer).closest('.cooked').length === 0) return;
|
||||
const withinCooked = range.startContainer.parentNode.closest('.cooked');
|
||||
if (!withinCooked || withinCooked.length === 0) return;
|
||||
|
||||
const $ancestor = $(range.commonAncestorContainer);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user