[BUG #7908] copy event listeners when swapping content elements