Commit f97d818c authored by Douwe Maan's avatar Douwe Maan

Merge branch '31193-ff-copy' into 'master'

fix inline diff copying in firefox

Closes #31193

See merge request !10838
parents 3f4b5a80 ae2e0b69
......@@ -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;
......
---
title: fix inline diff copy in firefox
merge_request:
author:
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment