Change-Id: I2c3843c078e72dc1f394b28ea7669cc232e1e739
// Made changes to DOM. Focus can be lost if it was in the
// widget.
- focusLost = widget.getElement().isOrHasChild(focusedElement);
+ focusLost = (focusedElement == null ? false : widget
+ .getElement().isOrHasChild(focusedElement));
}
} else if (caption != null) {
orphan(widget);
captionWrap = null;
// Made changes to DOM. Focus can be lost if it was in the widget.
- focusLost = widget.getElement().isOrHasChild(focusedElement);
+ focusLost = (focusedElement == null ? false : widget.getElement()
+ .isOrHasChild(focusedElement));
}
// Caption text