fix #39751: selection / deletion of chord symbols

fixes both the problems listed in the issue report