mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-12-18 22:22:23 +03:00
Fix hotkeys firing for multiple elements
This is due to react-hotkeys-hook v4.5.1 upgrade
This commit is contained in:
parent
894bfcc891
commit
b1d7592673
5 changed files with 17 additions and 17 deletions
|
@ -72,7 +72,7 @@ function Modal({ children, onClose, onClick, class: className, minimized }) {
|
||||||
<div
|
<div
|
||||||
ref={(node) => {
|
ref={(node) => {
|
||||||
modalRef.current = node;
|
modalRef.current = node;
|
||||||
escRef.current = node?.querySelector?.('[tabindex="-1"]') || node;
|
escRef(node?.querySelector?.('[tabindex="-1"]') || node);
|
||||||
}}
|
}}
|
||||||
className={className}
|
className={className}
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
|
|
|
@ -1519,11 +1519,11 @@ function Status({
|
||||||
node?.closest?.(
|
node?.closest?.(
|
||||||
'.timeline-item, .timeline-item-alt, .status-link, .status-focus',
|
'.timeline-item, .timeline-item-alt, .status-link, .status-focus',
|
||||||
) || node;
|
) || node;
|
||||||
rRef.current = nodeRef;
|
rRef(nodeRef);
|
||||||
fRef.current = nodeRef;
|
fRef(nodeRef);
|
||||||
dRef.current = nodeRef;
|
dRef(nodeRef);
|
||||||
bRef.current = nodeRef;
|
bRef(nodeRef);
|
||||||
xRef.current = nodeRef;
|
xRef(nodeRef);
|
||||||
}}
|
}}
|
||||||
tabindex="-1"
|
tabindex="-1"
|
||||||
class={`status ${
|
class={`status ${
|
||||||
|
|
|
@ -390,10 +390,10 @@ function Timeline({
|
||||||
}`}
|
}`}
|
||||||
ref={(node) => {
|
ref={(node) => {
|
||||||
scrollableRef.current = node;
|
scrollableRef.current = node;
|
||||||
jRef.current = node;
|
jRef(node);
|
||||||
kRef.current = node;
|
kRef(node);
|
||||||
oRef.current = node;
|
oRef(node);
|
||||||
dotRef.current = node;
|
dotRef(node);
|
||||||
}}
|
}}
|
||||||
tabIndex="-1"
|
tabIndex="-1"
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
|
|
|
@ -842,10 +842,10 @@ function Catchup() {
|
||||||
<div
|
<div
|
||||||
ref={(node) => {
|
ref={(node) => {
|
||||||
scrollableRef.current = node;
|
scrollableRef.current = node;
|
||||||
jRef.current = node;
|
jRef(node);
|
||||||
kRef.current = node;
|
kRef(node);
|
||||||
hlRef.current = node;
|
hlRef(node);
|
||||||
escRef.current = node;
|
escRef(node);
|
||||||
}}
|
}}
|
||||||
id="catchup-page"
|
id="catchup-page"
|
||||||
class="deck-container"
|
class="deck-container"
|
||||||
|
|
|
@ -477,9 +477,9 @@ function Notifications({ columnMode }) {
|
||||||
class="deck-container"
|
class="deck-container"
|
||||||
ref={(node) => {
|
ref={(node) => {
|
||||||
scrollableRef.current = node;
|
scrollableRef.current = node;
|
||||||
jRef.current = node;
|
jRef(node);
|
||||||
kRef.current = node;
|
kRef(node);
|
||||||
oRef.current = node;
|
oRef(node);
|
||||||
}}
|
}}
|
||||||
tabIndex="-1"
|
tabIndex="-1"
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in a new issue