mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 06:56:01 +08:00
Merge pull request #3539 from tgxworld/fix_incorrect_check_for_highlighted_test
FIX: Incorrect check when no text is selected.
This commit is contained in:
commit
a078eb1eed
|
@ -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 New Issue
Block a user