mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	attempt to fix problem when inserting link
This commit is contained in:
		| @@ -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); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user