Avoiding selection of text in legend