fix: remove select ranges

This commit is contained in:
JimQing 2020-07-04 01:18:02 +08:00
parent bbf5510bc8
commit 90fe9d45b0

View File

@ -187,8 +187,7 @@ export default {
range.setEndAfter(clipboardDiv.lastChild); range.setEndAfter(clipboardDiv.lastChild);
window.getSelection().addRange(range); window.getSelection().addRange(range);
document.execCommand('copy'); document.execCommand('copy');
range.setStartBefore(clipboardDiv.firstChild); window.getSelection().removeAllRanges()
range.setEndAfter(clipboardDiv.firstChild);
fixCodeWhiteSpace('normal'); fixCodeWhiteSpace('normal');
// //
this.$notify({ this.$notify({