Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐞 Strange Behavior of Callout Type Autocompletion #339

Open
3 of 7 tasks
RyzenFromFire opened this issue May 15, 2024 · 3 comments · May be fixed by #355
Open
3 of 7 tasks

🐞 Strange Behavior of Callout Type Autocompletion #339

RyzenFromFire opened this issue May 15, 2024 · 3 comments · May be fixed by #355

Comments

@RyzenFromFire
Copy link

Check for existing bug reports before submitting.

  • I searched for existing Bug Reports and found no similar reports.

Expected Behavior

I type >[! and a dropdown list of admonition types appears. I can type more characters to search/narrow down the list of types. When I press Enter (or alternatively Tab, doesn't matter to me), the currently selected one is autocompleted and my cursor is placed at the end.

Current behaviour

I type >[! and a dropdown list of admonition types appears. I can type more characters to search as desired, but the first character I type is always kept, and then the autocompleted type is concatenated. For example, if I type >[!n and then select the note type, the result is >[!nnote] (with my cursor one space after the bracket - that part is fine).

image
image

Furthermore, in this case, pressing Enter (or left-clicking) to confirm the autocompletion doesn't work in a clean vault for some reason. That is, I can't actually autocomplete.


If I only type >[! with no additional characters, then select a type, a newline is inserted. Like before, in a clean vault, pressing Enter or clicking to confirm doesn't do anything.

image
image


If I type a space >[! , then select a type, the selection menu remains open, which can cause "chaining" of the part of the admonition declaration after the part already typed (ex. note]):

image
image
image
image
...ad nauseum

Unlike the previous two cases, pressing Enter to confirm the autocompletion works in a clean vault, exhibiting the same behavior described here.

Reproduction

  1. Open any vault and file.
  2. If the Admonition plugin is not already installed, do so.
  3. Using live preview or source view mode, type >[! followed by: 1. some other character that is part of a valid admonition type, 2. nothing, or 3. a space.
  4. The admonition autocomplete selection menu appears. Select one by pressing Enter or clicking on it.
  5. Depending on what you did in Step 3, the behavior corresponding to the case described above occurs.

Which Operating Systems are you using?

  • Android
  • iPhone/iPad
  • Linux
  • macOS
  • Windows

Obsidian Version Check

v1.5.12 and v1.4.16

Plugin Version

10.2.0

Confirmation

  • I have disabled all other plugins and the issue still persists.

Possible solution

No response

@valentine195
Copy link
Member

I unfortunately can't recreate this at all. I will keep investigating.

@IsuminI
Copy link

IsuminI commented Nov 7, 2024

Hello!👋 We are a team of university students doing an open source contribution practice.
Would it be okay if we take a look and submit a PR for this? 😊

@valentine195
Copy link
Member

@IsuminI feel free :)

@IsuminI IsuminI linked a pull request Nov 24, 2024 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants