Skip to content

Commit

Permalink
DefaultFocusManager: fix passing focus to children of a container whe…
Browse files Browse the repository at this point in the history
…n that container is not visible
  • Loading branch information
joshtynjala committed Oct 10, 2024
1 parent caabba2 commit 5e0f7f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/feathers/core/DefaultFocusManager.hx
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ class DefaultFocusManager extends EventDispatcher implements IFocusManager {

private function findPreviousChildFocus(child:DisplayObject):IFocusObject {
var childContainer = Std.downcast(child, DisplayObjectContainer);
if (childContainer != null) {
if (childContainer != null && childContainer.visible) {
var findPrevChildContainer = !(childContainer is IFocusObject);
if (!findPrevChildContainer && (childContainer is IFocusContainer)) {
var focusContainer:IFocusContainer = cast childContainer;
Expand Down Expand Up @@ -653,7 +653,7 @@ class DefaultFocusManager extends EventDispatcher implements IFocusManager {
}

var childContainer = Std.downcast(child, DisplayObjectContainer);
if (childContainer != null) {
if (childContainer != null && childContainer.visible) {
var findNextChildContainer = !(childContainer is IFocusObject);
if (!findNextChildContainer && (childContainer is IFocusContainer)) {
var focusContainer:IFocusContainer = cast childContainer;
Expand Down

0 comments on commit 5e0f7f2

Please sign in to comment.