oliveryh / obsidian-emoji-toolbar

An Obsidian plugin to quickly add emojis into your notes
BSD 3-Clause "New" or "Revised" License
203 stars 11 forks source link

Cannot read properties of undefined (reading 'getElementsByTagName') #38

Open mw9982 opened 2 years ago

mw9982 commented 2 years ago

dearest community/developer,

When I engage the plugin, I get the subject error message:

Cannot read properties of undefined (reading 'getElementsByTagName')

The emoji panel displays, but nothing happens when I select one. The error message displays upon engaging the plugin, not after choosing the emoji.

Wondering if anyone else is experiencing this?

I am now limited to the use of :) and :( . Without these colorful, emotive emojis, my emotional vocabulary is spiraling. I am devolving at a very fast clip. Any help would be greatly appreciated. Before it's too late.... :).

M

oliveryh commented 2 years ago

Hi @mw9982 thank you for the bug report. I'll check my install shortly for the bug, but if you wouldn't mind including your Obsidian Version and Operating System that would be helpful to narrow down the issue.

mw9982 commented 2 years ago

Of course: Obsidian 0.15.9. Windows 10 Pro, OS build 19043.1889

ghost commented 2 years ago

Experiencing something similar on 0.15.9 (Linux). Emojis are visible in the picker but once one is selected it doesn't add it to the document. Picker closes but nothing appears in the document. No errors for me though.

oliveryh commented 2 years ago

Thank you both. I'll take a look this weekend

ghost commented 2 years ago

Some additional, possibly useless, information..

Edit: culprit seem to be the minimal theme. Disabling it results in emojis being rendered when in reading mode (still nothing in edit mode). This is with live preview enabled.

oliveryh commented 2 years ago

I've tried to reproduce any issues with the emojis being pasted in both the Snap (Ubuntu Linux) and the Windows 64-Bit Installer. In both cases with 0.15.9 installed and v0.3.1 of the emoji plugin, I couldn't see any obvious issues.

@mw9982 which installer did you use to install Obsidian? Additionally, is this without any additional plugins/themes running?

ghost commented 2 years ago

Does the plugin depend on the twemoji pkg being installed or does it pull the icons on its own? The problem I was having seem to be a mismatch between fonts. Removing the twemoji pkg which I had manually installed has made emoji-toolbar paste something visible in edit mode but it's not rendering the emojis.

fsdsads

oliveryh commented 2 years ago

The twemoji setting being on will replace emojis in view mode only. Anything in edit mode will display using the system installed font. In this case, that symbol is appearing because the font you have installed doesn't support that emoji.