kokopu-react 1.5.1 → 1.5.2
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 +8 -0
- package/dist/lib/Movetext.js +4 -0
- package/package.json +1 -1
- package/src/Movetext.js +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
ChangeLog
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
1.5.2 (April 29, 2022)
|
|
5
|
+
----------------------
|
|
6
|
+
* Prevent default actions when handling key events in component `Movetext`.
|
|
7
|
+
|
|
8
|
+
1.5.1 (April 29, 2022)
|
|
9
|
+
----------------------
|
|
10
|
+
* Add argument `evtOrigin` in `onMoveSelected(..)` callback in component `Movetext`.
|
|
11
|
+
|
|
4
12
|
1.5.0 (April 27, 2022)
|
|
5
13
|
----------------------
|
|
6
14
|
* Add component `Movetext` to display chess games.
|
package/dist/lib/Movetext.js
CHANGED
|
@@ -523,6 +523,10 @@ var Movetext = /*#__PURE__*/function (_React$Component) {
|
|
|
523
523
|
}, {
|
|
524
524
|
key: "handleKeyDownInFocusField",
|
|
525
525
|
value: function handleKeyDownInFocusField(evt) {
|
|
526
|
+
if (evt.key === 'Home' || evt.key === 'ArrowLeft' || evt.key === 'ArrowRight' || evt.key === 'End') {
|
|
527
|
+
evt.preventDefault();
|
|
528
|
+
}
|
|
529
|
+
|
|
526
530
|
if (!this.props.selection) {
|
|
527
531
|
return;
|
|
528
532
|
}
|
package/package.json
CHANGED
package/src/Movetext.js
CHANGED
|
@@ -331,6 +331,9 @@ export default class Movetext extends React.Component {
|
|
|
331
331
|
}
|
|
332
332
|
|
|
333
333
|
handleKeyDownInFocusField(evt) {
|
|
334
|
+
if (evt.key === 'Home' || evt.key === 'ArrowLeft' || evt.key === 'ArrowRight' || evt.key === 'End') {
|
|
335
|
+
evt.preventDefault();
|
|
336
|
+
}
|
|
334
337
|
if (!this.props.selection) {
|
|
335
338
|
return;
|
|
336
339
|
}
|