@mirasen/chessboard 1.0.2 → 1.0.3
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
CHANGED
|
@@ -56,5 +56,10 @@ export function rendererCoordinatesRender(state, context, layer) {
|
|
|
56
56
|
'dominant-baseline': 'auto'
|
|
57
57
|
});
|
|
58
58
|
text.textContent = label;
|
|
59
|
+
// Keep coordinate labels visual-only so mobile browsers do not select them
|
|
60
|
+
// or treat them as pointer targets during board interaction.
|
|
61
|
+
text.style.setProperty('pointer-events', 'none');
|
|
62
|
+
text.style.setProperty('user-select', 'none');
|
|
63
|
+
text.style.setProperty('-webkit-user-select', 'none');
|
|
59
64
|
}
|
|
60
65
|
}
|
|
@@ -2,6 +2,11 @@ import { createSvgElement } from './helpers.js';
|
|
|
2
2
|
export function createSvgRoots(options) {
|
|
3
3
|
const { doc } = options;
|
|
4
4
|
const svgRoot = createSvgElement(doc, 'svg', { 'data-chessboard-id': 'svg-root' });
|
|
5
|
+
svgRoot.style.setProperty('user-select', 'none');
|
|
6
|
+
svgRoot.style.setProperty('-webkit-user-select', 'none');
|
|
7
|
+
svgRoot.style.setProperty('touch-action', 'pinch-zoom');
|
|
8
|
+
svgRoot.style.setProperty('-webkit-touch-callout', 'none');
|
|
9
|
+
svgRoot.style.setProperty('-webkit-tap-highlight-color', 'transparent');
|
|
5
10
|
const result = {
|
|
6
11
|
svgRoot,
|
|
7
12
|
defs: createSvgElement(doc, 'defs', { 'data-chessboard-id': 'defs-root' }),
|
|
@@ -29,10 +29,6 @@ export function createInteractionController(options) {
|
|
|
29
29
|
break;
|
|
30
30
|
}
|
|
31
31
|
transmitTransientInput(internalState, context);
|
|
32
|
-
if (!context.rawEvent.defaultPrevented && context.rawEvent.cancelable) {
|
|
33
|
-
// Suppress native browser behavior for board-handled events.
|
|
34
|
-
context.rawEvent.preventDefault();
|
|
35
|
-
}
|
|
36
32
|
}
|
|
37
33
|
};
|
|
38
34
|
}
|
package/package.json
CHANGED