S2
S2 copied to clipboard
Copying cells not working in firefox and cannot copy row headers🐛
🏷 Version 1.26.0
Package | Version |
---|---|
@antv/s2 | 1.26.0 |
Sheet Type
- [ ] PivotSheet
🖋 Description
- I cannot copy cell values in the Firefox browser. (Selecting the cells with mouse and Cntrl+C)
- I cannot copy row/column headers in the Chrome browser (I can copy cell values).
- The columns are copied without newline characters.
- When I right-click after selecting cells, there is no copy option in the pop-up menu.
Note:
Above 1: Uncaught ReferenceError: ClipboardItem is not defined
It looks like Firefox and several other browsers do not support ClipboardItem object by default (https://developer.mozilla.org/en-US/docs/Web/API/ClipboardItem/ClipboardItem).
It may be helpful to you to mention that I used navigator.clipboard.writeText(S2.copyData(datasheet,'\t',true))
instead of S2.copyToClipboard(data)
to implement the copy button.
⌨️ Code Snapshots
const segment_s2Options = {
width: screen.width*10/12,
height: screen.height*0.3,
style: {
layoutWidthType: 'colAdaptive'
},
interaction: {
enableCopy: true,
selectedCellsSpotlight: false,
hoverHighlight: false,
selectedCellHighlight: true
}
}
你好 @ThamaluM,很抱歉给你带来了不好的体验, 我们会尽快排查问题并修复, 请关注后续发布日志.
Hello, @ThamaluM, We are so sorry for the bad experience. We will troubleshoot and fix the problem as soon as possible. Please pay attention to the follow-up change logs.
The latest version has been fixed, use sync copy when ClipboardItem
is not supported