The initial solution works when the focusin event is fired within the target container element, but fails when it is removed after being opened but without moving focus (e.g. open a dialog, then immediately close it).
This fixes that bug by setting this._hasFocus when the restorer instance is created.
I also updated the restorer stories so that focus moves to the created restorer container to more accurately simulate a popup.
Related to #306 Fixes ADO bug
The initial solution works when the
focusin
event is fired within the target container element, but fails when it is removed after being opened but without moving focus (e.g. open a dialog, then immediately close it).This fixes that bug by setting
this._hasFocus
when the restorer instance is created.I also updated the restorer stories so that focus moves to the created restorer container to more accurately simulate a popup.