Add test case that detached callback is called when element detached