mirror of
https://github.com/devon22/obsidian-gridexplorer.git
synced 2026-07-22 12:00:25 +00:00
3.1.9
This commit is contained in:
parent
1a37086da2
commit
4e57cd2a18
5 changed files with 24 additions and 6 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "gridexplorer",
|
||||
"name": "GridExplorer",
|
||||
"version": "3.1.8",
|
||||
"version": "3.1.9",
|
||||
"minAppVersion": "1.1.0",
|
||||
"description": "Browse note files in a grid view.",
|
||||
"author": "Devon22",
|
||||
|
|
|
|||
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "gridexplorer",
|
||||
"version": "3.1.8",
|
||||
"version": "3.1.9",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "gridexplorer",
|
||||
"version": "3.1.8",
|
||||
"version": "3.1.9",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@esbuild/linux-x64": "0.17.3",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "gridexplorer",
|
||||
"version": "3.1.8",
|
||||
"version": "3.1.9",
|
||||
"description": "Browse note files in a grid view.",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
|
|
|||
|
|
@ -226,7 +226,13 @@ export class SearchModal extends Modal {
|
|||
const optionsList = [searchScopeContainer, searchNameContainer, searchMediaFilesContainer];
|
||||
|
||||
// 監聽輸入框變化來控制清空按鈕的顯示並更新標籤建議
|
||||
searchInput.addEventListener('input', () => {
|
||||
let isComposing = false;
|
||||
searchInput.addEventListener('compositionstart', () => {
|
||||
isComposing = true;
|
||||
});
|
||||
searchInput.addEventListener('compositionend', () => {
|
||||
isComposing = false;
|
||||
// 合成結束後檢查是否需要 flush 標籤 (處理拼音選詞後的空格)
|
||||
if (/\s/.test(searchInput.value)) {
|
||||
if (flushInput(false, true)) {
|
||||
renderTagButtons();
|
||||
|
|
@ -236,8 +242,20 @@ export class SearchModal extends Modal {
|
|||
updateTagSuggestions();
|
||||
});
|
||||
|
||||
searchInput.addEventListener('input', () => {
|
||||
// 如果正在合成(如拼音輸入中),不執行會中斷輸入的 flush 操作
|
||||
if (!isComposing && /\s/.test(searchInput.value)) {
|
||||
if (flushInput(false, true)) {
|
||||
renderTagButtons();
|
||||
}
|
||||
}
|
||||
updateClearButton();
|
||||
updateTagSuggestions();
|
||||
});
|
||||
|
||||
// 處理上下鍵及 Enter 選擇建議
|
||||
searchInput.addEventListener('keydown', (e) => {
|
||||
if (isComposing) return;
|
||||
if (e.key === 'Backspace' && searchInput.value === '') {
|
||||
if (currentInputIndex > 0) {
|
||||
currentInputIndex--;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"3.1.8": "1.1.0"
|
||||
"3.1.9": "1.1.0"
|
||||
}
|
||||
Loading…
Reference in a new issue