Skip to content

Commit

Permalink
Use ul for search results
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-r-m committed Feb 7, 2021
1 parent fee1127 commit bcbb15b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/plugin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ joplin.plugins.register({

joplin.views.dialogs.setHtml(resourceSearch, `
<div id="resource-search">
<input id="query-input" type="text">
<div id="search-results"></div>
<input id="query-input" type="text" autofocus>
<ul id="search-results"></ul>
</div>
`);

Expand All @@ -77,7 +77,7 @@ joplin.plugins.register({
console.log(`results: ${JSON.stringify(result)}`);
return await transformResult(result);
case 'goto':
// TODO scroll to resource
// TODO scroll to the resource position within the note
await joplin.views.panels.hide(resourceSearch);
await joplin.commands.execute('openNote', msg.noteId);
break;
Expand Down
2 changes: 1 addition & 1 deletion src/webview/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class SearchDialog {
this.selectedIndex = -1;
for (let i = 0; i < this.results.length; i++) {
const searchResult = this.results[i];
const row = document.createElement('div');
const row = document.createElement('li');
row.setAttribute('class', 'search-result-row');
searchResults.appendChild(row);

Expand Down

0 comments on commit bcbb15b

Please sign in to comment.