Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]标签框不能正常显示。v2.27.8 #67

Closed
YanCore opened this issue Nov 12, 2024 · 3 comments
Closed

[BUG]标签框不能正常显示。v2.27.8 #67

YanCore opened this issue Nov 12, 2024 · 3 comments

Comments

@YanCore
Copy link

YanCore commented Nov 12, 2024

标签框不能正常显示。版本号:v2.27.8

界面截图

image

日志

app.js:1 TypeError: Cannot read properties of undefined (reading 'addEventListener')
    at new Ca (plugin:fuzzy-chinese-pinyin:21:36855)
    at new Dn (plugin:fuzzy-chinese-pinyin:21:38975)
    at new ql (plugin:fuzzy-chinese-pinyin:21:52018)
    at kr.addTagInput (plugin:fuzzy-chinese-pinyin:21:43168)
    at kr.onOpen (plugin:fuzzy-chinese-pinyin:21:43399)
    at e.open (app.js:1:1304660)
    at Object.callback (plugin:fuzzy-chinese-pinyin:24:7988)
    at ZU (app.js:1:1935452)
    at e.executeCommand (app.js:1:1937023)
    at e.eval (plugin:dbfolder:491:3722)
    at e.i [as executeCommand] (plugin:dbfolder:487:75925)
    at e.executeCommandById (app.js:1:1936930)
    at Object.eval [as func] (plugin:at-symbol-linking:3139:29)
    at e.handleKey (app.js:1:754621)
    at e.handleKey (app.js:1:754734)
    at t.handleKey (app.js:1:754943)
    at e.onKeyEvent (app.js:1:755877)

image

image

image

@YanCore
Copy link
Author

YanCore commented Nov 12, 2024

看了下对应到这个代码文件src/utils/pinyinSuggest.ts。这部分代码:

export class PinyinSuggest extends TextInputSuggest<MatchData<Item>> {
    getItemFunction: (query: string) => MatchData<Item>[];
    plugin: ThePlugin;
    constructor(inputEl: HTMLInputElement | HTMLTextAreaElement, plugin: ThePlugin) {
        super(inputEl);
        this.plugin = plugin;
    }
}

应该和Obsidian版本关系不大吧。目前Obsidian版本:v1.7.6。

@YanCore
Copy link
Author

YanCore commented Nov 12, 2024

试了下直接改JS可以显示。源码应该改这部分。要么你忘记了,要么Obsidian更新接口了。 期待你的更新。

export class PinyinSuggest extends TextInputSuggest<MatchData<Item>> {
    constructor(inputEl: HTMLInputElement | HTMLTextAreaElement, plugin: ThePlugin) {

        super(plugin,inputEl);

        this.plugin = plugin;
    }
}

@lazyloong
Copy link
Owner

确实是接口变了,不过不是 ob 的接口,引用了某个插件里的代码。2.27.9应该行了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants