Closed MemerGamer closed 10 months ago
Command pallet isn't working... (I am on macOS btw)
Command pallet isn't working... (I am on macOS btw)
Could you send me some logs maybe? I will look into it later today
where are they?
btw, CMD+n, CMD+o isn't working too
but CMD+w is working
and in your PR, window.animateDiv is null...
I will look into it today thank you for testing it on macOS
I debugged it, and the body keydown event isn't getting executed
I debugged it, and the real event is inside originalEvent
just change .keydown((e) => { to .keydown(({originalEvent: e})=> {
just change .keydown((e) => { to .keydown(({originalEvent: e})=> {
Thank you so much, I will change that and test it, when I get home
you don't need, I just saw that this is already in the constructor lol
its actually the window.animateDiv that don't end up in window, because something stopping the execution of the code
My debug is pointing to those 2 functions:
window.title.val(decodeURIComponent(info[0])); editor.setData(info[1]);
My debug is pointing to those 2 functions:
window.title.val(decodeURIComponent(info[0])); editor.setData(info[1]);
I see that makes sense, it is a weird scenerio where I needed to use them while I was working on the title. I will debug and fix this today
So the current problem is that, if we check the event with jQuery the language specific characters doesn't get to the event handler, so we can't write those characters in the title. But it doesn't blocks the hotkey shortcut handler to recognize them.
The version that I did with JavaScript is the opposite, it captures all the input, even the hotkeys, so that is way the hotkeys didn't worked.
Man you gotta love Javascript :)
I will try to think of a solution, but I tought that this issue could appear somewhere else, so I'm probably going to rewrite this handler in jQuery (since most of the code is written with that) and we will see how it will work out.
for me it stopped the execution... I debugged it with console.logs and after those lines, nothing was executing
for me it stopped the execution... I debugged it with console.logs and after those lines, nothing was executing
Yes because the event handler captured the "change" and blocked the code. One temporary solution could be for me to change the code like this:
...
window.title.on("input", async () => {
const encodedTitle = encodeURIComponent(window.title.val());
save_title(window.path, encodedTitle);
manage_tabs(await get_tabs());
window.path = encodedTitle;
});
...
This way we could write in our edit in our native languages but we cant write language specific characters to the title like "á" for example, but we would get our hotkeys back.
I wil make a commit with this change and I will try to fix the title issue
btw for the keys you can use e.code
W it's working now!
Contributor
Yes, except the title, but when I will have time, I will fix that as well
With this change you can write in the title and in the editor language specific characters in the following languages: English, French, German, Spanish, Portuguese, Russian, Chinese (Simplified), Japanese, Korean, Polish, Hungarian, Romanian
Example: I can write "hálás" ( a word in Hungarian meaning grateful ), or I can write the word "recunoscător" ( which means the same in Romanian ) in the title or in the editor. This will help people to take notes in their native languages
I even tested it with Anthy Japanese and it works great