We should run the transition only when the anchor root IS attached,
and we should only call the dismiss callback when the animation has
completed and the window has been removed.
Bug: 25323707
Bug: 26647820
Change-Id: I2bcdc901885d4c0a6c48c2b2c949797def1d7512