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