shabegom / buttons

Buttons in Obsidian
The Unlicense
455 stars 47 forks source link

Button maker #40

Closed mnvwvnm closed 3 years ago

mnvwvnm commented 3 years ago

I detected an issue with the "Button Maker" and I don't know how to solve it. I have two vaults with the same plugins, css snippets, etc. In one vault everything works fine (open the Button Maker from the command palette), in the other vault the "Button Maker" window does not show up (but the "Insert Inline Button" window works)! I reinstalled the plugin but the issue remains. Any idea? Thank you.

shabegom commented 3 years ago

I'm not sure what would cause that!

So the modal window doesn't appear at all?

mnvwvnm commented 3 years ago

Yes, the modal window doesn't appear at all. I'm not an 'expert' to provide a good read of the dev console, but I found this:

Uncaught TypeError: Cannot read property 'toLowerCase' of undefined
    at new TemplateSuggest (eval at <anonymous> (app.js:1), <anonymous>:3404:82)
    at new ButtonModal (eval at <anonymous> (app.js:1), <anonymous>:3482:28)
    at Object.callback (eval at <anonymous> (app.js:1), <anonymous>:3849:29)
    at LE (app.js:1)
    at t.onChooseItem (app.js:1)
    at t.onChooseSuggestion (app.js:1)
    at t.selectSuggestion (app.js:1)
    at e.useSelectedItem (app.js:1)
    at Object.func (app.js:1)
    at e.handleKey (app.js:1)
TemplateSuggest @ suggest.ts:228
ButtonModal @ modal.ts:33
callback @ index.ts:62
LE @ app.js:1
t.onChooseItem @ app.js:1
t.onChooseSuggestion @ app.js:1
t.selectSuggestion @ app.js:1
e.useSelectedItem @ app.js:1
(anonymous) @ app.js:1
e.handleKey @ app.js:1
e.onKeyEvent @ app.js:1
shabegom commented 3 years ago

@mnvwvnm I've just released 0.4.6 and this bug should now be fixed. Please give it a try and let me know!

mnvwvnm commented 3 years ago

I haven't tested the functionalities, but the modal window opens. Thanks.