canvas-datagrid 0.3.23 → 0.3.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/canvas-datagrid.debug.js +10 -9
- package/dist/canvas-datagrid.debug.map +1 -1
- package/dist/canvas-datagrid.js +1 -1
- package/dist/canvas-datagrid.module.js +1 -1
- package/dist/canvas-datagrid.module.js.map +1 -1
- package/lib/events/index.js +10 -9
- package/lib/events/util.js +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ All notable changes to this project will be documented in this file.
|
|
|
7
7
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
8
8
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
9
9
|
|
|
10
|
+
## 0.3.24 - 2021-12-22
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Prevent default when handling cut event and cleanup utility functions (mdebrauw, #454)
|
|
15
|
+
|
|
10
16
|
## 0.3.23 - 2021-12-16
|
|
11
17
|
|
|
12
18
|
### Fixed
|
|
@@ -5809,19 +5809,19 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
5809
5809
|
});
|
|
5810
5810
|
};
|
|
5811
5811
|
|
|
5812
|
-
self.cut = function (
|
|
5812
|
+
self.cut = function (event) {
|
|
5813
5813
|
if (self.dispatchEvent('cut', {
|
|
5814
|
-
NativeEvent:
|
|
5814
|
+
NativeEvent: event
|
|
5815
5815
|
})) {
|
|
5816
5816
|
return;
|
|
5817
5817
|
} // Expecting instance of `ClipboardEvent` with `clipboardData` attribute
|
|
5818
5818
|
|
|
5819
5819
|
|
|
5820
|
-
if (!self.hasFocus || !
|
|
5820
|
+
if (!self.hasFocus || !event.clipboardData) {
|
|
5821
5821
|
return;
|
|
5822
5822
|
}
|
|
5823
5823
|
|
|
5824
|
-
self.copySelectedCellsToClipboard(
|
|
5824
|
+
self.copySelectedCellsToClipboard(event.clipboardData);
|
|
5825
5825
|
var affectedCells = self.clearSelectedCells();
|
|
5826
5826
|
self.dispatchEvent('aftercut', {
|
|
5827
5827
|
cells: affectedCells
|
|
@@ -5829,22 +5829,23 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
5829
5829
|
requestAnimationFrame(function () {
|
|
5830
5830
|
return self.draw();
|
|
5831
5831
|
});
|
|
5832
|
+
event.preventDefault();
|
|
5832
5833
|
};
|
|
5833
5834
|
|
|
5834
|
-
self.copy = function (
|
|
5835
|
+
self.copy = function (event) {
|
|
5835
5836
|
if (self.dispatchEvent('copy', {
|
|
5836
|
-
NativeEvent:
|
|
5837
|
+
NativeEvent: event
|
|
5837
5838
|
})) {
|
|
5838
5839
|
return;
|
|
5839
5840
|
} // Expecting instance of `ClipboardEvent` with `clipboardData` attribute
|
|
5840
5841
|
|
|
5841
5842
|
|
|
5842
|
-
if (!self.hasFocus || !
|
|
5843
|
+
if (!self.hasFocus || !event.clipboardData) {
|
|
5843
5844
|
return;
|
|
5844
5845
|
}
|
|
5845
5846
|
|
|
5846
|
-
self.copySelectedCellsToClipboard(
|
|
5847
|
-
|
|
5847
|
+
self.copySelectedCellsToClipboard(event.clipboardData);
|
|
5848
|
+
event.preventDefault();
|
|
5848
5849
|
};
|
|
5849
5850
|
|
|
5850
5851
|
return;
|