function hasValidSelection(domEvent) {
  if (domEvent.type === 'selectionchange') {
    return isSelectionValid();
  }

  return domEvent.type === 'select';
}
Ignore 'selectionchange' events that don't correspond with a person's intent to
select text.