Merge the selection change handler