Fix hotkeys firing for multiple elements

This is due to react-hotkeys-hook v4.5.1 upgrade
This commit is contained in:
Lim Chee Aun 2024-09-15 23:41:18 +08:00
parent 894bfcc891
commit b1d7592673
5 changed files with 17 additions and 17 deletions

View file

@ -72,7 +72,7 @@ function Modal({ children, onClose, onClick, class: className, minimized }) {
<div
ref={(node) => {
modalRef.current = node;
escRef.current = node?.querySelector?.('[tabindex="-1"]') || node;
escRef(node?.querySelector?.('[tabindex="-1"]') || node);
}}
className={className}
onClick={(e) => {

View file

@ -1519,11 +1519,11 @@ function Status({
node?.closest?.(
'.timeline-item, .timeline-item-alt, .status-link, .status-focus',
) || node;
rRef.current = nodeRef;
fRef.current = nodeRef;
dRef.current = nodeRef;
bRef.current = nodeRef;
xRef.current = nodeRef;
rRef(nodeRef);
fRef(nodeRef);
dRef(nodeRef);
bRef(nodeRef);
xRef(nodeRef);
}}
tabindex="-1"
class={`status ${

View file

@ -390,10 +390,10 @@ function Timeline({
}`}
ref={(node) => {
scrollableRef.current = node;
jRef.current = node;
kRef.current = node;
oRef.current = node;
dotRef.current = node;
jRef(node);
kRef(node);
oRef(node);
dotRef(node);
}}
tabIndex="-1"
onClick={(e) => {

View file

@ -842,10 +842,10 @@ function Catchup() {
<div
ref={(node) => {
scrollableRef.current = node;
jRef.current = node;
kRef.current = node;
hlRef.current = node;
escRef.current = node;
jRef(node);
kRef(node);
hlRef(node);
escRef(node);
}}
id="catchup-page"
class="deck-container"

View file

@ -477,9 +477,9 @@ function Notifications({ columnMode }) {
class="deck-container"
ref={(node) => {
scrollableRef.current = node;
jRef.current = node;
kRef.current = node;
oRef.current = node;
jRef(node);
kRef(node);
oRef(node);
}}
tabIndex="-1"
>