Option to disable selected items close button

Useful for preselected items that shouldn't be removed from selection.

Also added two missing semi-colons and moved break outside if statement.