mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 11:02:28 +08:00
when a user clicks on a source, don't swap focus
This commit is contained in:
parent
bd97d971ed
commit
08626c7a2d
@ -313,7 +313,12 @@ export default class LlmChatPanel extends BasicWidget {
|
||||
// Add click handler for better user experience
|
||||
sourceElement.querySelector('.source-link')?.addEventListener('click', (e) => {
|
||||
e.preventDefault();
|
||||
appContext.tabManager.openTabWithNoteWithHoisting(source.noteId);
|
||||
e.stopPropagation();
|
||||
|
||||
// Open the note in a new tab but don't switch to it
|
||||
appContext.tabManager.openTabWithNoteWithHoisting(source.noteId, { activate: false });
|
||||
|
||||
return false; // Additional measure to prevent the event from bubbling up
|
||||
});
|
||||
|
||||
this.sourcesList.appendChild(sourceElement);
|
||||
|
Loading…
x
Reference in New Issue
Block a user