@zhenliang/sheet 0.1.77 → 0.1.78

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.
@@ -52,11 +52,19 @@ export var useKeyBoard = function useKeyBoard(handler, listenElement) {
52
52
  handler.escape(e);
53
53
  return;
54
54
  }
55
+ var isEnter = keyCode === ENTER_KEY;
56
+ if (isEnter && !shiftKey) {
57
+ handler.enter(e);
58
+ return;
59
+ }
55
60
  var isSearch = ctrlKeyPressed && keyCode === F_KEY;
56
61
  if (isSearch) {
57
62
  handler.search(e);
58
63
  return;
59
64
  }
65
+ if (e.target !== listenElement) {
66
+ return;
67
+ }
60
68
  var isReverse = ctrlKeyPressed && keyCode === Z_KEY && !shiftKey;
61
69
  if (isReverse) {
62
70
  handler.reverse(e);
@@ -91,11 +99,6 @@ export var useKeyBoard = function useKeyBoard(handler, listenElement) {
91
99
  handler.delete(e);
92
100
  return;
93
101
  }
94
- var isEnter = keyCode === ENTER_KEY;
95
- if (isEnter && !shiftKey) {
96
- handler.enter(e);
97
- return;
98
- }
99
102
  if (ctrlKeyPressed) {
100
103
  return;
101
104
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhenliang/sheet",
3
- "version": "0.1.77",
3
+ "version": "0.1.78",
4
4
  "description": "A react library developed with dumi",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",