mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Disable keyboard navigation if a modal is open in the library
This commit is contained in:
parent
5187ad5113
commit
92423eaa0d
1 changed files with 5 additions and 6 deletions
|
|
@ -236,14 +236,8 @@ export function HomeFeedContainer(props: HomeFeedContainerProps): JSX.Element {
|
|||
return
|
||||
}
|
||||
|
||||
// If any of the modals are open we disable handling keyboard shortcuts
|
||||
if (labelsTarget || snoozeTarget || shareTarget) {
|
||||
return
|
||||
}
|
||||
|
||||
switch (action) {
|
||||
case 'showDetail':
|
||||
|
||||
const username = viewerData?.me?.profile.username
|
||||
if (username) {
|
||||
setActiveCardId(item.node.id)
|
||||
|
|
@ -293,6 +287,11 @@ export function HomeFeedContainer(props: HomeFeedContainerProps): JSX.Element {
|
|||
return gridColumnCount
|
||||
}
|
||||
|
||||
// If any of the modals are open we disable handling keyboard shortcuts
|
||||
if (labelsTarget || snoozeTarget || shareTarget) {
|
||||
return
|
||||
}
|
||||
|
||||
switch (action) {
|
||||
case 'openArticle':
|
||||
handleCardAction('showDetail', activeItem)
|
||||
|
|
|
|||
Loading…
Reference in a new issue