fix inline diff copying in firefox
This commit is contained in:
parent
bbd83376d6
commit
ae2e0b6915
|
@ -169,7 +169,10 @@
|
|||
w.gl.utils.getSelectedFragment = () => {
|
||||
const selection = window.getSelection();
|
||||
if (selection.rangeCount === 0) return null;
|
||||
const documentFragment = selection.getRangeAt(0).cloneContents();
|
||||
const documentFragment = document.createDocumentFragment();
|
||||
for (let i = 0; i < selection.rangeCount; i += 1) {
|
||||
documentFragment.appendChild(selection.getRangeAt(i).cloneContents());
|
||||
}
|
||||
if (documentFragment.textContent.length === 0) return null;
|
||||
|
||||
return documentFragment;
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: fix inline diff copy in firefox
|
||||
merge_request:
|
||||
author:
|
Loading…
Reference in New Issue