@solidtv/solid 1.3.9-0 → 1.3.9
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/dist/src/core/dom-renderer/domRenderer.js +5 -1
- package/dist/src/core/dom-renderer/domRenderer.js.map +1 -1
- package/dist/src/primitives/Virtual.jsx +1 -1
- package/dist/src/primitives/Virtual.jsx.map +1 -1
- package/dist/src/primitives/useMouse.js +11 -1
- package/dist/src/primitives/useMouse.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/core/dom-renderer/domRenderer.ts +5 -1
- package/src/primitives/Virtual.tsx +1 -1
- package/src/primitives/useMouse.ts +13 -1
package/package.json
CHANGED
|
@@ -1232,7 +1232,11 @@ function updateNodeData(node: DOMNode | DOMText) {
|
|
|
1232
1232
|
if (keyValue === undefined) {
|
|
1233
1233
|
node.div.removeAttribute('data-' + key);
|
|
1234
1234
|
} else {
|
|
1235
|
-
|
|
1235
|
+
// dataset[key] requires key to already be camelCase (DOMStringMap rejects hyphenated
|
|
1236
|
+
// property names outright, e.g. "section-id" -- SyntaxError: not a valid property
|
|
1237
|
+
// name). Our data props are passed as data-attribute-style keys (kebab-case), so use
|
|
1238
|
+
// setAttribute directly instead, consistent with the removeAttribute branch above.
|
|
1239
|
+
node.div.setAttribute('data-' + key, String(keyValue));
|
|
1236
1240
|
}
|
|
1237
1241
|
}
|
|
1238
1242
|
}
|
|
@@ -51,7 +51,7 @@ function createKeyboardEvent(
|
|
|
51
51
|
keyCode: number,
|
|
52
52
|
eventName: string = 'keydown',
|
|
53
53
|
): KeyboardEvent {
|
|
54
|
-
|
|
54
|
+
const event = new KeyboardEvent(eventName, {
|
|
55
55
|
key,
|
|
56
56
|
keyCode,
|
|
57
57
|
which: keyCode,
|
|
@@ -61,6 +61,18 @@ function createKeyboardEvent(
|
|
|
61
61
|
metaKey: false,
|
|
62
62
|
bubbles: true,
|
|
63
63
|
});
|
|
64
|
+
|
|
65
|
+
// Chrome < 51 (LG webOS 3.x runs Chrome 38) ignores the key/keyCode/which
|
|
66
|
+
// members of KeyboardEventInit, so the event arrives with key '' / keyCode 0
|
|
67
|
+
// and the focusManager drops it. Force the values onto the instance so Magic
|
|
68
|
+
// Remote clicks and scrolls still map to keys on those devices.
|
|
69
|
+
if (event.key !== key || event.keyCode !== keyCode) {
|
|
70
|
+
Object.defineProperty(event, 'key', { get: () => key });
|
|
71
|
+
Object.defineProperty(event, 'keyCode', { get: () => keyCode });
|
|
72
|
+
Object.defineProperty(event, 'which', { get: () => keyCode });
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return event;
|
|
64
76
|
}
|
|
65
77
|
|
|
66
78
|
const [cursorVisible, setCursorVisible] = createSignal(false);
|