Skip to content

Commit

Permalink
Don't expand and collapse groups using shortcuts if the frame isn't i…
Browse files Browse the repository at this point in the history
…n focus

Signed-off-by: Axel Boberg <[email protected]>
  • Loading branch information
axelboberg committed Mar 2, 2024
1 parent b7a0777 commit 33b352d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions plugins/rundown/app/components/RundownGroupItem/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ export function RundownGroupItem ({ index, item }) {

React.useEffect(() => {
function onShortcut (shortcut) {
/*
Don't execute any shortcuts
if the frame isn't focused
*/
if (!window.bridgeFrameHasFocus) {
return
}

switch (shortcut) {
case 'bridge.rundown.collapse':
setCollapsed(true)
Expand Down
4 changes: 4 additions & 0 deletions plugins/rundown/app/views/Rundown.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ export function Rundown () {

React.useEffect(() => {
function onShortcut (shortcut) {
/*
Don't execute any shortcuts
if the frame isn't focused
*/
if (!window.bridgeFrameHasFocus) {
return
}
Expand Down

0 comments on commit 33b352d

Please sign in to comment.