fix another source of the selection/clicking bug
This commit is contained in:
1 parent
3af8a638ca
commit
2d95541126
2 files changed
+4
-2
No files matched your search
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "nazeka",
|
"name": "nazeka",
|
||||||
"version": "0.4.6",
|
"version": "0.4.7",
|
||||||
"author": "Wareya",
|
"author": "Wareya",
|
||||||
"homepage_url": "https://github.com/wareya/nazeka",
|
"homepage_url": "https://github.com/wareya/nazeka",
|
||||||
"description": "A rikai replacement.",
|
"description": "A rikai replacement.",
|
||||||
|
|||||||
+3
-1
@@ -1800,8 +1800,10 @@ function grab_more_text(textNode, selection_range, direction = 1)
|
|||||||
function grab_text(textNode, offset, elemental)
|
function grab_text(textNode, offset, elemental)
|
||||||
{
|
{
|
||||||
let selection_range = window.getSelection();
|
let selection_range = window.getSelection();
|
||||||
if(selection_range)
|
if(selection_range && selection_range.rangeCount > 0)
|
||||||
selection_range = selection_range.getRangeAt(0);
|
selection_range = selection_range.getRangeAt(0);
|
||||||
|
else
|
||||||
|
selection_range = undefined;
|
||||||
|
|
||||||
if(selection_filter_enabled(selection_range) && selection_rejects_node(selection_range, textNode, offset))
|
if(selection_filter_enabled(selection_range) && selection_rejects_node(selection_range, textNode, offset))
|
||||||
selection_range = undefined;
|
selection_range = undefined;
|
||||||
|
|||||||
Reference in new issue
Block a user