mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-30 19:08:10 -05:00
FIX: Incorrect check when no text is selected.
This commit is contained in:
parent
e3f31da861
commit
d127e1179f
1 changed files with 1 additions and 1 deletions
|
@ -27,7 +27,7 @@ export default DiscourseController.extend({
|
|||
|
||||
const selection = window.getSelection();
|
||||
// no selections
|
||||
if (selection.rangeCount === 0) return;
|
||||
if (selection.isCollapsed) return;
|
||||
|
||||
// retrieve the selected range
|
||||
const range = selection.getRangeAt(0),
|
||||
|
|
Loading…
Reference in a new issue