mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 05:28:59 +01:00 
			
		
		
		
	fix clicking internal link in the ckeditor toolbar, closes #3236
This commit is contained in:
		
							parent
							
								
									f6ad1c6aa7
								
							
						
					
					
						commit
						c7acfd4d4e
					
				
							
								
								
									
										2
									
								
								libraries/ckeditor/ckeditor.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								libraries/ckeditor/ckeditor.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@ -230,18 +230,7 @@ function focusSavedElement() {
 | 
				
			|||||||
        return;
 | 
					        return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if ($lastFocusedElement.hasClass("ck")) {
 | 
					    $lastFocusedElement.focus();
 | 
				
			||||||
        // must handle CKEditor separately because of this bug: https://github.com/ckeditor/ckeditor5/issues/607
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        const editor = $lastFocusedElement
 | 
					 | 
				
			||||||
            .closest('.ck-editor__editable')
 | 
					 | 
				
			||||||
            .prop('ckeditorInstance');
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        editor.editing.view.focus();
 | 
					 | 
				
			||||||
    } else {
 | 
					 | 
				
			||||||
        $lastFocusedElement.focus();
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    $lastFocusedElement = null;
 | 
					    $lastFocusedElement = null;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -252,7 +241,7 @@ async function openDialog($dialog, closeActDialog = true) {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    saveFocusedElement();
 | 
					    saveFocusedElement();
 | 
				
			||||||
 | 
					-
 | 
				
			||||||
    $dialog.modal();
 | 
					    $dialog.modal();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    $dialog.on('hidden.bs.modal', () => {
 | 
					    $dialog.on('hidden.bs.modal', () => {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user