mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 13:39:01 +01:00 
			
		
		
		
	Merge branch 'stable'
# Conflicts: # src/public/javascripts/dialogs/add_link.js
This commit is contained in:
		
						commit
						93c0469aa0
					
				@ -93,15 +93,16 @@ $form.submit(() => {
 | 
			
		||||
            $dialog.modal('hide');
 | 
			
		||||
 | 
			
		||||
            const linkHref = '#' + notePath;
 | 
			
		||||
            const editor = noteDetailService.getActiveComponent().getEditor();
 | 
			
		||||
 | 
			
		||||
            if (hasSelection()) {
 | 
			
		||||
                const editor = noteDetailService.getActiveComponent().getEditor();
 | 
			
		||||
 | 
			
		||||
                editor.execute('link', linkHref);
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
                linkService.addLinkToEditor(linkTitle, linkHref);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            editor.editing.view.focus();
 | 
			
		||||
        }
 | 
			
		||||
        else if (linkType === 'selected-to-active') {
 | 
			
		||||
            const prefix = $clonePrefix.val();
 | 
			
		||||
@ -144,10 +145,6 @@ function linkTypeChanged() {
 | 
			
		||||
 | 
			
		||||
$linkTypes.change(linkTypeChanged);
 | 
			
		||||
 | 
			
		||||
// return back focus to note text detail after quitting add link
 | 
			
		||||
// the problem is that cursor position is reset
 | 
			
		||||
$dialog.on("hidden.bs.modal", () => noteDetailService.getActiveComponent().focus());
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
    showDialog,
 | 
			
		||||
    showDialogForClone
 | 
			
		||||
 | 
			
		||||
@ -92,7 +92,7 @@ async function getManyRows(query, params) {
 | 
			
		||||
    let results = [];
 | 
			
		||||
 | 
			
		||||
    while (params.length > 0) {
 | 
			
		||||
        const curParams = params.slice(0, Math.max(params.length, PARAM_LIMIT));
 | 
			
		||||
        const curParams = params.slice(0, Math.min(params.length, PARAM_LIMIT));
 | 
			
		||||
        params = params.slice(curParams.length);
 | 
			
		||||
 | 
			
		||||
        let i = 1;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user