There may be a way to use `detach` appropriately here instead of toggling display.