FIX: Quoting a nested quote should preserve original post info.
This commit is contained in:
parent
a3d47f1aad
commit
7a32a99595
|
@ -65,6 +65,7 @@ export default Component.extend({
|
|||
opts.username = element.dataset.username || getQuoteTitle(element);
|
||||
opts.post = element.dataset.post;
|
||||
opts.topic = element.dataset.topic;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ export function selectedText() {
|
|||
export function selectedElement() {
|
||||
const selection = window.getSelection();
|
||||
if (selection.rangeCount > 0) {
|
||||
return selection.getRangeAt(0).startContainer.parentElement;
|
||||
return selection.getRangeAt(0).commonAncestorContainer.parentElement;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue