Repository navigation
Choice stopped working after Obsidian 1.13.6 update #1666
Replies: 1 comment 1 reply
|
Hey, thanks for posting this. Good hunch, timing is exactly it. In 1.13.6 Obsidian changed how zoom is applied (part of the fix for zoom resetting on reload). The Zoom in command reads the window's current zoom level and asks Obsidian's main process to set it one step higher, but that new level now arrives a moment after the command returns. A macro runs its steps back to back, so steps 2-4 still see the old level and all four set the same value. You end up one step in (110%) instead of four (144%). Your 100 ms Wait steps work because they give each step time to land before the next one reads the level. QuickAdd can't tell when an Obsidian command has actually finished, since commands don't report back. That's what the Wait step is for, so your fix is the right one for a macro. On my test machine each step lands in about a millisecond, so 100 ms leaves plenty of headroom. If you want something tidier, replace the whole macro with a single user script step that sets the level directly: // Scripts/set-zoom.js
module.exports = () => {
// 0 = 100%, each "Zoom in" adds 0.5, so 2 = four steps (144%).
electronWindow.setFrameZoomLevel(2);
};That's the same call Obsidian's own zoom slider uses. It's one step, so there's nothing to race, and it sets an absolute level. That matters because since 1.13.6 Obsidian keeps the zoom when the window reloads. With four Zoom in steps, a reload stacks another four on top and you hit the 300% max. The script just sets 144% again. Desktop only, since Side note: if the reason for the startup macro is that Obsidian forgets your zoom on restart, that looks like this known Linux/X11 bug on Obsidian's side: https://forum.obsidian.md/t/linux-zoom-level-zoom-factor-scaling-is-not-restored-on-startup-xwayland-x11-maximize-too/104591. Once that's fixed you might not need the macro at all :) |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I had a simple choice that ran the "Zoom in" command four times on startup to get the zoom level I wanted. It stopped working after today's Obsidian update.
I had a hunch that timing might be the problem, so I added a 100 ms delay after each "Zoom in" command. It worked.
I hope this helps other users.
P.S. On Linux Mint 22.3 - Cinnamon 64-bit.
All reactions