Skip to content

Commit 7690841

Browse files
authored
(rsg) Fixed focus handling in Node to ensure global focus reference is set correctly (#901)
1 parent 15781ad commit 7690841

File tree

1 file changed

+2
-2
lines changed
  • src/extensions/scenegraph/nodes

1 file changed

+2
-2
lines changed

src/extensions/scenegraph/nodes/Node.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -901,8 +901,6 @@ export class Node extends RoSGNode implements BrsValue {
901901
return false;
902902
}
903903

904-
sgRoot.setFocused(this);
905-
906904
// Get the focus chain, with lowest ancestor first.
907905
let newFocusChain = this.createPath();
908906

@@ -925,6 +923,8 @@ export class Node extends RoSGNode implements BrsValue {
925923
currFocusChain[i].setValue(focusedChild, BrsInvalid.Instance, false);
926924
}
927925
}
926+
// Set the global focused node reference to this node.
927+
sgRoot.setFocused(this);
928928

929929
// Set the focusedChild for each ancestor to the next node in the chain,
930930
// which is the current node's child.

0 commit comments

Comments
 (0)