Skip to content

Commit

Permalink
PopUpListView: null checks for stage
Browse files Browse the repository at this point in the history
  • Loading branch information
joshtynjala committed Mar 8, 2024
1 parent d46c66c commit 1263d2e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/feathers/controls/PopUpListView.hx
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,9 @@ class PopUpListView extends FeathersControl implements IIndexSelector implements
return;
}
if (this._focusManager == null) {
this.stage.focus = this;
if (this.stage != null) {
this.stage.focus = this;
}
// removing focus from the ListView might cause closeListView()
// to be called recursively, so check again whether it is open
// before continuing
Expand Down Expand Up @@ -992,7 +994,9 @@ class PopUpListView extends FeathersControl implements IIndexSelector implements
return;
}
event.preventDefault();
this.stage.focus = this.button;
if (this.stage != null) {
this.stage.focus = this.button;
}
}

private function popUpListView_listView_focusOutHandler(event:FocusEvent):Void {
Expand Down

0 comments on commit 1263d2e

Please sign in to comment.