Skip to content

Commit

Permalink
MET-3209 fix error when user selects empty text
Browse files Browse the repository at this point in the history
(e.g. double click on space between words)
  • Loading branch information
agentschmitt committed May 16, 2024
1 parent 4975183 commit 0e5cc3a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/selection/SelectionHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ export default class SelectionHandler extends EventEmitter {
selection: top,
element: this.document.querySelector(`.r6o-annotation[data-id="${top.id}"]`)
});
} else {
} else if (stub.quote) {
// User selected new text (but skip empty selections)
this.emit('select', {
selection: stub,
element: selectedRange
Expand Down

0 comments on commit 0e5cc3a

Please sign in to comment.