mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-30 04:01:31 +08:00 
			
		
		
		
	attempt to fix problem when inserting link
This commit is contained in:
		
							parent
							
								
									c16ed9546b
								
							
						
					
					
						commit
						8a388842aa
					
				| @ -98,7 +98,7 @@ | |||||||
|     </div> |     </div> | ||||||
| 
 | 
 | ||||||
|     <div id="insertLinkDialog" title="Recent notes" style="display: none;"> |     <div id="insertLinkDialog" title="Recent notes" style="display: none;"> | ||||||
|       <form> |       <form id="insertLinkForm"> | ||||||
|         <div class="form-group"> |         <div class="form-group"> | ||||||
|           <label for="noteAutocomplete">Link to note</label> |           <label for="noteAutocomplete">Link to note</label> | ||||||
|           <input id="noteAutocomplete" style="width: 100%;"> |           <input id="noteAutocomplete" style="width: 100%;"> | ||||||
| @ -109,7 +109,7 @@ | |||||||
|           <input id="linkTitle" style="width: 100%;"> |           <input id="linkTitle" style="width: 100%;"> | ||||||
|         </div> |         </div> | ||||||
| 
 | 
 | ||||||
|         <button id="addLinkButton" class="btn btn-sm">Add link</button> |         <button id="addLinkButton" type="submit" class="btn btn-sm">Add link</button> | ||||||
|       </form> |       </form> | ||||||
|     </div> |     </div> | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -135,7 +135,7 @@ $(document).bind('keydown', 'alt+l', function() { | |||||||
|     }); |     }); | ||||||
| }); | }); | ||||||
| 
 | 
 | ||||||
| $("#addLinkButton").click(function() { | $("#insertLinkForm").submit(function addLink() { | ||||||
|     let val = $("#noteAutocomplete").val(); |     let val = $("#noteAutocomplete").val(); | ||||||
| 
 | 
 | ||||||
|     const noteIdMatch = / \(([A-Za-z0-9]{22})\)/.exec(val); |     const noteIdMatch = / \(([A-Za-z0-9]{22})\)/.exec(val); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 azivner
						azivner