Cannot type or use Shortcuts in Citation Selector

## Description

TL;DR: I have to set the Citation Dialog to keep above other windows, but it won't focus into the citation dialog (can't type characters) unless I right-click.
When I enable "keep above other windows" in the window settings of my OS or enable `extensions.zotero.integration.keepAddCitationDialogRaised` in the config editor of Zotero, I have to right-click the red Citation Dialog bar in order to interact with it with my keyboard.
- I learned about the `...keepAddCitationDialogRaised` solution from this [article](https://medium.com/obsidian-observer/zotero-citation-selector-window-appearing-behind-focused-window-solved-c47b669fb75a).
- The interactions I'm referring to is typing the title or author of the citation I'm looking for and accessing the keyboard shortcuts like `down arrow` to go through the suggested citations, `enter` to select a citation, and `enter` to add the selected citation to my document.
- If I do not right-click the Citation Dialog bar, I'll only be able to `left click` the default suggestion (what I already have open in Zotero) and `left click` the arrow to add the selected citation to my document.

If I do not have the Citation Dialog raised or set to keep above other windows, I have to find the application in my application hot bar, click it and proceed to (no need to right-click it) type, select and add my citation with the mouse or keyboard.

Notes:
- The Citation Dialog is also known as the Citation Selector Window, Add/Edit Citation in Word, Zotero Pop-up Box, Citation Red Bar, or the Citation Insert Bar.
- The Citation Dialog, when opened, will allow the user to use "keyword/author searching to find the article you're looking for. A list of matching citations will pop up below the search box." Users can select the appropriate citation(s) to add them into their document, usually with a third party tool.

Excuse over explaining the problem and the additional context. It's so the keywords are there in case anyone else has the same or a similar problem.

## Environment:

- OS: MX x86_64 (based on Debian)
- Browser: Vivaldi (7.0.3495.29 (Stable channel) stable (64-bit) ) & Brave (1.74.48 Chromium: 132.0.6834.83 (Official Build) unknown (64-bit) )
- Web Clipper version: 0.10.7
- Obsidian version: v1.7.7 (deb installation (NOT an AppImage) )

## Context

I'm using [Obsidian](https://obsidian.md) and the [Zotero Integration](https://github.com/mgmeyers/obsidian-zotero-integration) plugin. The Zotero Integration plugin uses the Zotero Citation Dialog to select a citation to apply a template I made. This creates a Literature note that has the metadata of the citation I selected in the format I specified in my template.

## Steps to Reproduce

I really have no idea. Apparently, having to raise the Citation Dialog window appears to be a problem only some people have. So only someone who has had the same problem, seen a similar problem, know a possible workaround, or have enough background knowledge to know how to proceed from here.

## Attempted Solutions

- I tried some of the other options in the Windows Rules like "Accept Focus", "Focus Protection", "Focus Stealing Protection", "No Title Bar and Frame", and of course "Keep Above Other Windows".
- I tried combinations with this and enabling `extensions.zotero.integration.keepAddCitationDialogRaised` in Zotero
- I tried enabling the Classic view of the Citation Dialog by enabling `extensions.zotero.integration.useClassicAddCitationDialog` but I get the same problems with the default view where I have to right-click into it with my mouse to interact with it through my keyboard.
- I tried looking for a relevant option in the Config editor by searching the keywords "Citation" and "Dialog" but didn't find anything I was too confident in playing with.
- Restarting Zotero.
- Restarting Obsidian.
- Restarting my Laptop.

## Potential Solutions

- Maybe there's an option in the Config editor made for people with this specific issue?
- Maybe there's a keyboard shortcut to right-click focus on a window that has the "focus" (I'm assuming it has the focus, but I guess it technically does not since I have to right-click into it)

## Relevant Links:

Article `extensions.zotero.integration.keepAddCitationDialogRaised` is from: https://medium.com/obsidian-observer/zotero-citation-selector-window-appearing-behind-focused-window-solved-c47b669fb75a
Obsidian: https://obsidian.md
Zotero Integration: https://github.com/mgmeyers/obsidian-zotero-integration
Learn more about the Linux KDE Window Rules here:
- KDE Docs Website (split up into sub-pages): https://docs.kde.org/stable5/en/kwin/kcontrol/windowspecific/index.html
- As a PDF (takes a little long to load but easier to navigate): https://docs.kde.org/stable5/en/kwin/kcontrol/windowspecific/index.html
  • Can you replicate this using only Zotero-provided software, with LibreOffice or Google Docs and with all plugins disabled?
  • @dstillman
    I don't use LibreOffice or Google Docs, so I didn't instinctively test the issue on them. But I can give them a test some time tomorrow.
  • @dstillman
    I have the same issue in Google Docs.
    As you can see from the image below, I have to raise the Citation Dialog to the front:
    https://s3.amazonaws.com/zotero.org/images/forums/u16255424/zjz0mvkmwx4bjr684dvh.png

    It would be clearer with a video, but in the image below, when the Citation Dialog is raised, it is not blinking:
    https://s3.amazonaws.com/zotero.org/images/forums/u16255424/tbcim1srerpvasusos74.png

    Also, small edit to my original post, I can `left-click` now to be able to type into the search bar of the citation dialog. I swear I spammed the `left-click` button yesterday, but I could be mistaken or got confused with something else. I can now `left-click` and `right-click` to interact with the Citation Dialog with the keyboard.

    Should I also test this on LibreOffice? I'm pretty sure it will have the same issue.
  • To start with, the "keep raised" or "keep above other windows" options are not going to be relevant, since you need the dialog to receive focus. A window can be pinned above other windows without having focus, which is your primary issue.

    Now, generally window handling is done by the OS and Zotero has somewhat limited control over whether it can successfully raise itself. Zotero is based on Firefox and the Firefox code issues the relevant commands to the OS to tell it that it wants a window to appear and get focus. It's up to the OS to listen to those. However, with the switch from Zotero 6 to Zotero 7 we also upgraded the underlying version of Firefox. This version supports Wayland better, but possibly X worse, so if you are using X it might be worth to try switching to Wayland. Furthermore, sometimes OSes have heuristics about focusing windows depending on the parent window state, so if you are minimizing Zotero, you should avoid that and instead switch focus to the relevant app, which might help to focus the citation dialog upon opening.
  • @adomasven
    Yes I understand. I just want to make sure I cover all my bases and mention additional configurations I made.

    This time, I made sure I didn't minimize Zotero, but the issue still persists.

    I thought I was using Wayland this whole time, ha ha. I just checked and apparently I'm using X11. I'll switch over when KDE plasma 6 comes out in the next Debian release which is projected to be around the Summer or after when I do a reinstallation.

    For now, I'd like to ask for help with a workaround in X11. I don't mind installing additional programs that can help with this. Since testing this issue and documenting it, I got a better understand of the relevant keywords, so I'll spend another session looking for solutions with adding a focus to an application or maybe an add-on to the window rules.
Sign In or Register to comment.