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

Pressing Enter to "Add link" does not work anymore #1100

Closed
St0rml opened this issue Feb 2, 2025 · 3 comments
Closed

Pressing Enter to "Add link" does not work anymore #1100

St0rml opened this issue Feb 2, 2025 · 3 comments

Comments

@St0rml
Copy link

St0rml commented Feb 2, 2025

Description

When adding an internal Link (Ctrl + L), after selecting the note in the "Add link" modal (either by typing and choosing with mouse, or typing and confirming with enter) and pressing to add the link, the add link button in the modal becomes unresponsive, and no link is added to the note.

This is both in the local application and the web interface.

When clicking the "Add link"-button in the modal in its "unresponsive" state, the following error is printed to console: ws.ts:21 13:19:16 No link to add.

Edit: the same is also true for the "Include note" Modal.

TriliumNext Version

0.91.5

What operating system are you using?

Other Linux

What is your setup?

Local + server sync

Operating System Version

Zorin OS 17.2 Core

Error logs

No response

@redeel-media
Copy link

v0.90.12 is the last version that works properly.
v0.91.1-beta introduces a bug that does a text search instead of adding the link when pressing enter.
v0.91.3-beta is where the current behavior starts.

@St0rml
Copy link
Author

St0rml commented Feb 5, 2025

Based on the observations of @redeel-media, I suspect this might have something to do with the refactor/rewriting of note_autocomplete.js to typescript note_autocomplete.ts, as all dialogs in which I experience this issue use this service.
When I have a free minute I will try to investigate further.

@St0rml
Copy link
Author

St0rml commented Feb 7, 2025

I checked some more, and it seems I was wrong. I cannot, however, pinpoint what changed. Anyway, I did manage to implement a fix by adding a listener to the autocomplete:selected event and just shifting the focus to the button then. It works, but feels kinda hacky. I'll make a PR nonetheless and see, if the maintainer accepts that solution.

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

No branches or pull requests

2 participants