# Obsidian - Hookmark not working in aditional windows (ie not the main widow)

**URL:** <https://discourse.hookproductivity.com/t/obsidian-hookmark-not-working-in-aditional-windows-ie-not-the-main-widow/8435>\
**Category:** Bug Reports\
**Created:** [September 23, 2024, 1:10pm UTC](https://discourse.hookproductivity.com/t/obsidian-hookmark-not-working-in-aditional-windows-ie-not-the-main-widow/8435 "2024-09-23T13:10:37Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxlinworm](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/maxlinworm/32/3214_2.png) [@maxlinworm](https://discourse.hookproductivity.com/u/maxlinworm)\
**Post date:** [September 23, 2024, 1:10pm UTC](https://discourse.hookproductivity.com/t/obsidian-hookmark-not-working-in-aditional-windows-ie-not-the-main-widow/8435/1 "2024-09-23T13:10:37Z")

</div>

Obsidian introduced the ability to open various windows. It uses the main window vs child windows model (I don’t know how it’s actually called). Additional windows don’t show the navigation pane (file explorer).

If I invoke hookmark’s in a child window, the main window is activated and hookmarks gets it’s document URL not of the document that was opened in the child window where it was activated.

So there’s two related problems:

1. Cant get the URL of documents opened in child windows in Obsidian
2. Invoking hookmark in a child windows changes the focus to the main window.

I’m using:

- macOS Sonoma 14.4.1;
- Hookmark Pro version 6.3 (6035) (Scripts version 340)
- Obsidian v. Version 1.6.7 (Installer 1.5.12)
- Changed the scheme to use hook/file (haven’t teste the other options)

I don’t know if this is a bug report, a feature request or a discussion and help post. The mods can feel free to reclassify it.

---

<div class="post-metadata">

**Author:** ![LucB](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/lucb/32/2228_2.png) [@LucB](https://discourse.hookproductivity.com/u/LucB)\
**Post date:** [September 23, 2024, 6:43pm UTC](https://discourse.hookproductivity.com/t/obsidian-hookmark-not-working-in-aditional-windows-ie-not-the-main-widow/8435/2 "2024-09-23T18:43:26Z")

</div>

> [@maxlinworm](#):
>
> If I invoke hookmark’s in a child window, the main window is activated and hookmarks gets it’s document URL not of the document that was opened in the child window where it was activated.

strictly speaking this behavior is due to the way Obsidian itself handles its x-callback-url. Hookmark invokes Obsidian’s x-callback-url to get the name and address of the current note. (Technical customers may wish to look at Hookmark \> Preferences \> Scripts \> Obsidian to see the relevant integration script.) We’d need to get in touch with Obsidian to request alternative behavior.

I have not tried Obsidian’s child windows but will have a look.

---

<div class="post-metadata">

**Author:** ![LucB](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/lucb/32/2228_2.png) [@LucB](https://discourse.hookproductivity.com/u/LucB)\
**Post date:** [September 23, 2024, 9:48pm UTC](https://discourse.hookproductivity.com/t/obsidian-hookmark-not-working-in-aditional-windows-ie-not-the-main-widow/8435/3 "2024-09-23T21:48:39Z")

</div>

1. Could you please tell us how to generate an inner window for Obsidian? We’d like to try to reproduce the issue.
2. Are you sure that the focus is on the inner window? I.e., that you have clicked in the editor?

---

<div class="post-metadata">

**Author:** ![LucB](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/lucb/32/2228_2.png) [@LucB](https://discourse.hookproductivity.com/u/LucB)\
**Post date:** [September 23, 2024, 10:33pm UTC](https://discourse.hookproductivity.com/t/obsidian-hookmark-not-working-in-aditional-windows-ie-not-the-main-widow/8435/4 "2024-09-23T22:33:24Z")

</div>

OK, I have reproduced the issue. There’s an “open in new window” contextual menu option.

Looks like a bug in their x-callback-url. I’ll log it on their forum

---

<div class="post-metadata">

**Author:** ![LucB](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/lucb/32/2228_2.png) [@LucB](https://discourse.hookproductivity.com/u/LucB)\
**Post date:** [September 23, 2024, 10:41pm UTC](https://discourse.hookproductivity.com/t/obsidian-hookmark-not-working-in-aditional-windows-ie-not-the-main-widow/8435/5 "2024-09-23T22:41:35Z")

</div>

I have logged an issue with the Obsidian team in their **Developers: Plugin & API** forum.

> **[Bug in x-callback-url when called in a new window: it returns the focus to...](https://forum.obsidian.md/t/bug-in-x-callback-url-when-called-in-a-new-window-it-returns-the-focus-to-main-window-and-returns-url-of-main-window/88857)**
>
> There’s a new bug in obsidian://hook-get-address? URL reproduced like this. procedure In Obsidian main window, edit a note, Foo. Right click on a different note, and choose “open in new window” type Bar in that window. invoke the...

---

<div class="post-metadata">

**Author:** ![maxlinworm](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/maxlinworm/32/3214_2.png) [@maxlinworm](https://discourse.hookproductivity.com/u/maxlinworm)\
**Post date:** [September 23, 2024, 10:58pm UTC](https://discourse.hookproductivity.com/t/obsidian-hookmark-not-working-in-aditional-windows-ie-not-the-main-widow/8435/6 "2024-09-23T22:58:08Z")

</div>

Sorry for the late reply. Was at work.

Ive attached two screen recordings.

In the first, just because I was trying to record, Hookmark worked a few times, and others not.

The second recording shows the bug happening again, but this time I couldn’t make hookmark grab the “child” window.

Go figure why sometimes it worked in the first recording.

[https://1drv.ms/v/s!AiyQlVgLajaVj-Zl7zprNxT10Pkf\_A?e=meMM8Q](https://1drv.ms/v/s!AiyQlVgLajaVj-Zl7zprNxT10Pkf_A?e=meMM8Q)

[https://1drv.ms/v/s!AiyQlVgLajaVj-ZoiaKEMys0ozY8RQ?e=IjvKaH](https://1drv.ms/v/s!AiyQlVgLajaVj-ZoiaKEMys0ozY8RQ?e=IjvKaH)

---

<div class="post-metadata">

**Author:** ![LucB](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/lucb/32/2228_2.png) [@LucB](https://discourse.hookproductivity.com/u/LucB)\
**Post date:** [September 23, 2024, 11:01pm UTC](https://discourse.hookproductivity.com/t/obsidian-hookmark-not-working-in-aditional-windows-ie-not-the-main-widow/8435/7 "2024-09-23T23:01:06Z")

</div>

thanks. as noted we can reproduce the issue and we’ve logged the bug with Obsidian. When the Hookmark work is elicited in Obsidian, it calls the x-callback-url that I referenced. Their x-callback-url needs to be updated to work properly with “child” windows. I recommend responding to the topic I created in the Obsidian forum so that they understand that the issue comes from one of their regular users, not just from CogSci Apps Corp.

---

<div class="post-metadata">

**Author:** ![LucB](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/lucb/32/2228_2.png) [@LucB](https://discourse.hookproductivity.com/u/LucB)\
**Post date:** [September 26, 2024, 10:40pm UTC](https://discourse.hookproductivity.com/t/obsidian-hookmark-not-working-in-aditional-windows-ie-not-the-main-widow/8435/8 "2024-09-26T22:40:11Z")

</div>

Obsidian team will fix this in Obsidian v.1.8.0.
