Add double-click-select-all handler for math blocks