FIX: Incorrect check when no text is selected.

This commit is contained in:
Guo Xiang Tan 2015-06-10 14:39:29 +08:00
parent e3f31da861
commit d127e1179f

View file

@ -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),