Fix popover when using append.
Add test for popover.
Merge pull request #13165 from stefanneculai/master

Fix popover when using append