cm-chessboard 7.10.0 → 7.10.1
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/package.json
CHANGED
|
@@ -65,8 +65,8 @@ export class VisualMoveInput {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
moveInputCanceledCallback(fromSquare, toSquare, reason) {
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
this.view.moveInputCanceledCallback(fromSquare, toSquare, reason)
|
|
69
|
+
this.chessboard.state.moveInputProcess.resolve()
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
setMoveInputState(newState, params = undefined) {
|
|
@@ -240,14 +240,15 @@ export class VisualMoveInput {
|
|
|
240
240
|
|
|
241
241
|
onPointerDown(e) {
|
|
242
242
|
if (!(e.type === "mousedown" && e.button === 0 || e.type === "touchstart")) {
|
|
243
|
-
return
|
|
243
|
+
return
|
|
244
|
+
}
|
|
245
|
+
if(e.type === "mousedown") { // another try to prevent strange safari desktop select all bug
|
|
246
|
+
e.preventDefault()
|
|
244
247
|
}
|
|
245
|
-
|
|
246
248
|
const square = e.target.getAttribute("data-square")
|
|
247
249
|
if (!square) { // pointer on square
|
|
248
|
-
return
|
|
250
|
+
return
|
|
249
251
|
}
|
|
250
|
-
|
|
251
252
|
const pieceName = this.chessboard.getPiece(square)
|
|
252
253
|
let color
|
|
253
254
|
if (pieceName) {
|