KeyType icon indicating copy to clipboard operation
KeyType copied to clipboard

Issue: Rendering issue in apps like Obsidian

Open Fish-Owl opened this issue 6 months ago • 10 comments

I use Obsidian to write notes, and I had an issue using KeyType, as suggestions would appear inside of bubbles rather than in-line. There was also an issue with the scale of the text in the app.

See attached screenshot:

Image

Fish-Owl avatar May 31 '26 18:05 Fish-Owl

@Fish-Owl

Let me look into this.

To be honest, I don't personally use many Electron apps (e.g. Obsidian), so unfortunately my own testing in these apps will be hit and miss. It doesn't help that macOS's Accessibility API isn't great with Electron apps and browsers, so bug smashing in these apps will be difficult and time consuming, and often need per-app testing and intervention..

johnbean393 avatar May 31 '26 18:05 johnbean393

I have noticed the scaling or positioning is off in other common apps as well.

macOS Chrome Omnibar:

Image

macOS Chrome Google Search:

Image

This is really funny, it thinks Dia's dialog boxes are text input fields for some reason :

Image

I'm finding it really buggy on Confluence in Dia, I think it's something about how the text spans work.

Image

It looks great on macOS Safari:

Image

Even Confluence works a lot better on Safari:

Image

I guess it's really challenging to account for all these different apps, and especially web browsers + random websites, but I thought I'd just report it regardless.

slatlasdev avatar Jun 02 '26 04:06 slatlasdev

@slatlasdev

You caught me! I'm a Safari user myself, so it's no surprise that support is best in Safari.

Dia is notoriously bad with macOS Accessibility API compatibility. Unfortunately, given that the user base is rather limited, I don't think I'll be spending too much time trying to patch Dia support.

The focus for browser support will remain Chrome + Safari.

If you can make a PR to help, I'm happy to take a look and merge it if it works well!

johnbean393 avatar Jun 02 '26 06:06 johnbean393

No worries, thanks for being upfront about that.

I'm actually surprised that there would be such a discrepancy between Dia and Chrome, considering the underlying engine is the same. I guess the UI layer is what's different?

For now, I'm giving Cotypist a try (yes, I actually started with your app and went the other way to most people 😅), and I found interestingly it tells me "For inline suggestions, enable Text Metrics in the Dia Accessibility settings.": https://cotypist.app/compatibility#arc-dia - so I guess it does have poorer support.

Giving your app a try as well with that setting enabled, it actually improves the behavior quite a bit. So maybe it's just a matter of letting your users know to do the same thing?

When does the app decide to use the floating bubble vs inline suggestions?

slatlasdev avatar Jun 02 '26 07:06 slatlasdev

Shame issue happens in basically every app for me. Slack, Discord, Edge, Outlook. It's pretty unusable currently due to this.

Image

DanBennettUK avatar Jun 02 '26 08:06 DanBennettUK

@DanBennettUK

Fix incoming for these Slack and Discord. Will release in the next few days.

johnbean393 avatar Jun 02 '26 14:06 johnbean393

@slatlasdev

The app uses the floating bubble:

  1. For mid-line completions
  2. When the coordinates for the ghost text inline suggestions are likely very unreliable

Edit: As part of release 1.3 (5), ghost text inline suggestion placement has been improved for Google Chrome. Feel free to update and test it!

johnbean393 avatar Jun 02 '26 15:06 johnbean393

@DanBennettUK

The fixes for Slack and Discord have shipped in version 1.3 (5). Feel free to update and test it!

johnbean393 avatar Jun 02 '26 17:06 johnbean393

Mine doesn't render at all in Obsidian unfortunately. Default theme, no snippets, Restricted Mode, Source mode, logs show SHOWN + PLACE mode=inline, no visible completion. Looking forward to a fix

Keysz avatar Jun 11 '26 17:06 Keysz

Same here: the suggestion’s size and alignment are off in most apps, especially in Chrome (for example, ChatGPT and Gmail).

lemikeone avatar Sep 20 '26 11:09 lemikeone