From a8ef47e80d069cf2a9df267c5ba97db3bc00e56e Mon Sep 17 00:00:00 2001 From: OpaqueGlass Date: Fri, 1 Nov 2024 19:30:05 +0800 Subject: [PATCH] Release v1.0.1 --- CHANGELOG.md | 3 +++ README_zh_CN.md | 2 +- index.js | 1 + plugin.json | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2727d8b..8574fd2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ## 更新日志 +### v1.0.1 (2024年11月1日) +- 修复:编辑器内存在选区时,无法打开文档的问题; + ### v1.0.0 (2024年11月1日) - 改进:在重命名、移动文档后,及时更新面包屑(默认禁用,需要在设置中打开); - 改进:兼容思源v3.1.11的自定义文档图标; diff --git a/README_zh_CN.md b/README_zh_CN.md index 9fce018..d3aa0f8 100644 --- a/README_zh_CN.md +++ b/README_zh_CN.md @@ -4,7 +4,7 @@ > 在编辑器上方显示当前文档路径信息的[思源笔记](https://github.com/siyuan-note/siyuan)插件。 -> 当前版本:v1.0.0 **改进**:(设置项、默认关闭)在文档重命名、移动后及时更新面包屑;**改进**:兼容[自定义默认图标](https://github.com/siyuan-note/siyuan/issues/12721); +> 当前版本:v1.0.1 **改进**:(设置项、默认关闭)在文档重命名、移动后及时更新面包屑;**改进**:兼容[自定义默认图标](https://github.com/siyuan-note/siyuan/issues/12721);**修复**: 存在选区时无法打开文档的问题; > > 详见[更新日志](CHANGELOG.md) diff --git a/index.js b/index.js index a433853..44d83c4 100644 --- a/index.js +++ b/index.js @@ -1121,6 +1121,7 @@ function openRefLink(event, paramId = "", keyParam = undefined, protyleElem = un altKey: event?.altKey ?? keyParam?.altKey, bubbles: true }); + window.getSelection()?.removeAllRanges(); 虚拟链接.dispatchEvent(clickEvent); 虚拟链接.remove(); } diff --git a/plugin.json b/plugin.json index 2c089fe..97273af 100644 --- a/plugin.json +++ b/plugin.json @@ -2,7 +2,7 @@ "name": "syplugin-fakeDocBreadcrumb", "author": "OpaqueGlass", "url": "https://github.com/OpaqueGlass/syplugin-fakeDocBreadcrumb", - "version": "1.0.0", + "version": "1.0.1", "displayName": { "default": "fakeDocBreadcrumb", "zh_CN": "(伪)文档面包屑",