prevent text selection rectangle from covering only part of the selection (e.g. if a selection starts and ends with quotation marks)