]> BookStack Code Mirror - bookstack/commitdiff
Fixed tag numbering in last commit
authorDan Brown <redacted>
Fri, 7 Apr 2023 16:54:17 +0000 (17:54 +0100)
committerDan Brown <redacted>
Fri, 7 Apr 2023 16:54:17 +0000 (17:54 +0100)
resources/js/components/auto-suggest.js

index 89a507b9094208df3dcb6fbc056130212da0dca7..2ebf59f5dbf5ae08112d27384f96728b44fb3250 100644 (file)
@@ -110,7 +110,7 @@ export class AutoSuggest extends Component {
 
         // This used to use <button>s but was changed to div elements since Safari would not focus on buttons
         // on which causes a range of other complexities related to focus handling.
-        this.list.innerHTML = suggestions.map(value => `<li><div tabindex="-1" class="text-item">${escapeHtml(value)}</div></li>`).join('');
+        this.list.innerHTML = suggestions.map(value => `<li><div tabindex="0" class="text-item">${escapeHtml(value)}</div></li>`).join('');
         this.list.style.display = 'block';
         for (const button of this.list.querySelectorAll('.text-item')) {
             button.addEventListener('blur', this.hideSuggestionsIfFocusedLost.bind(this));