_getFocused must be an attached descendant

When I try to get focus on tag it shows error - _getFocused must be an attached descendant component but its :[R]#1:[0]App:[0]Content:[0]Pages:[17]#321:[5]Terms’

Please help.

image

Make sure the component you are returning from _getFocused is attached to the document. So it looks like the Terms component’s _getFocused is probably returning a dynamic component which hasn’t been created yet… Sometimes I like to do

_getFocused() {
  return this.tag('focusTerms') || this
}
2 Likes

Thanks Chiefcll, you saved my time :slight_smile:

1 Like