summaryrefslogtreecommitdiff
path: root/src/client/app
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-10-20 06:42:19 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-10-20 06:42:19 +0900
commit5d3fe9599b6b04d010cc1423c104d6daf9adc902 (patch)
tree05cbc4c5bccf06f96e6a22572996e1c30413c71c /src/client/app
parent10.26.0 (diff)
downloadmisskey-5d3fe9599b6b04d010cc1423c104d6daf9adc902.tar.gz
misskey-5d3fe9599b6b04d010cc1423c104d6daf9adc902.tar.bz2
misskey-5d3fe9599b6b04d010cc1423c104d6daf9adc902.zip
Improve performance
Diffstat (limited to 'src/client/app')
-rw-r--r--src/client/app/common/hotkey.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/app/common/hotkey.ts b/src/client/app/common/hotkey.ts
index c7d81a6361..f7366e35cb 100644
--- a/src/client/app/common/hotkey.ts
+++ b/src/client/app/common/hotkey.ts
@@ -67,10 +67,10 @@ export default {
// flatten
const reservedKeys = concat(actions.map(a => a.patterns));
- el.dataset.reservedKeys = JSON.stringify(reservedKeys);
+ el._misskey_reservedKeys = reservedKeys;
el._keyHandler = (e: KeyboardEvent) => {
- const targetReservedKeys = JSON.parse(document.activeElement ? ((document.activeElement as any).dataset || {}).reservedKeys || '[]' : '[]');
+ const targetReservedKeys = document.activeElement ? ((document.activeElement as any)._misskey_reservedKeys || []) : [];
if (document.activeElement && ignoreElemens.some(el => document.activeElement.matches(el))) return;
for (const action of actions) {